Add link, forward, backward, and other functions to Button/input. When you look at the title, you should understand what is going on. We use the most A-level link in daily webpage creation, some of my friends may have never used to add links to buttons. Today, the fireworks editor adds links related to buttons and inputs to move forward and backward, the pop-up confirmation alert window and other code are sorted out, hoping to help you.
The Code is as follows:
Copy to ClipboardReference: [www.bkjia.com] 1. Link to a page
<Input type = "button" name = "Submit" value = "Confirm" class = "btn" onclick = "location. href = 'HTTP: // www.bkjia.com/down'"/>
2. Return (equivalent to back)
<Input name = "Submit2" type = "button" class = "btn" onclick = "location. href = 'javascript: history. go (-1); '"value =" return "/>
3. Open a new webpage
<Input type = "button" name = "Submit2" value = "Confirm" class = "btn" onclick = "Define Your open('filename.html ')"/>
4. open a new window without Borders
<Input type = "button" name = "Submit2" value = "Confirm" class = "btn" onclick = "javascript: window. open ('HTTP: // bbs.bkjia.com ', '', 'width = 720, height = 500, resizable = yes, scrollbars = yes, status = no')"/>
5. Open a new page and point to another page
<Input type = "button" name = "Submit2" value = "" class = "btn" onclick = "window.open('filename.html '); location. href = 'HTTP: // www.liehuo.org '"/>
6. open a new window without borders and point to another page
<Input type = "button" name = "Submit2" value = "Confirm" class = "btn" onclick = "javascript: window. open ('HTTP: // www.liehuo.org ', '', 'width = 720, height = 500, resizable = yes, scrollbars = yes, status = no'); registry.location='filename.html '; "/>
7. click the button to bring up the confirmation alert window.
Method 1:
<Input type = "button" name = "Submit1" value = "OK" class = "btn"
OnClick = "alert ('liehuo _ net prompt: submitted successfully! '); Location. href = 'filename.html'; return false; ">
Method 2:
<Input type = "button" name = "Submit2" value = "OK" class = "btn"
OnClick = "if (confirm ('fire school tips: Are you sure you want to submit? ') Location. href = 'filename.html'; return false; ">
Thank you for your support for the fire school. Thank you for your valuable comments!