Hello teacher, jump to the question
ma
ma 2019-07-10 18:09:44
0
5
1359

In order to test the jump, I added a button to the page with the ID register11, but the jump did not respond. Please tell me what's wrong.

$("#register11").on('click', function () {

window.location.href = "http://www.jb51.net";

}),


ma
ma

reply all(3)
樂成
<p id="register11">点击</p>
<script src="http://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>
$("#register11").click(function(){
   window.location.href = "http://www.jb51.net";
});

This way of writing requires the introduction of jquery.js

ma

The id was created by myself, the function is valid, and even if I add an alert information window, it will appear, but nothing will happen when jumping. Can you help me jump for this test? I'll test it.

  • reply Can the teacher write a small code to test the jump? I will test it.
    ma author 2019-07-11 11:29:34
  • reply Does it have anything to do with whether pop-up windows and redirects are blocked in Google browser?
    ma author 2019-07-11 12:27:07
自然

The ID is register11. Is it on the page or modified by other js

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template