Click the button HTML tags are three ways to implement the page jump

Method 1: Use onclick event
1
2
<INPUT type = "button" value = "button"
onclick = "javascrtpt: window.location.href = ' http://www.9252.com/ '" />
  or directly button tag
. 1
<button the onclick = "window.location.href = ' https://www.9252.com/'"> children </ button> ;
method 2: a jacket label in a label button
. 1
2
. 3
<the href = a " http://www.9252.com/"> ;
<Button> children </ Button>
</a>
  or
. 1
<a href=" http://www.9252.com/"> <INPUT type = "button" value = 'child'> </a>
Method 3: Use JavaScript functions
. 1
2
3
. 4
. 5
. 6
. 7
. 8
<Script>
function Jump () {
window.location.href = " http://www.9252.com/ ";
}
</ Script>
<INPUT type = "Button" value = "child" onclick = javascrtpt: jump ( ) />
// or <input type = "button" value = " children" the onclick = "Jump ()" />
// or <button onclick = "jump () "> children </ button>
summarized
above is I will give you the HTML tags click the button three methods to achieve the jump page, we want to help, if you have any questions please give me a message

Guess you like

Origin blog.51cto.com/yanhuang/2480348