javascript - html: execute function when link clicked, get alert and then redirect to another page -
What is the best way to combine two wires
string 1: < Pre> and string 2: so that: myFunc () executed; The alert appears; Once the alert is clicked, the page is redirected to , I ask the most correct way of doing this I am here. Thank you. Try it out: Explanation: & lt; A href = "javascript: myFunc ();" Onclick = "warning ('myFunc execution')" & gt; Click here & lt; / A & gt;
& lt; A href = "http://google.com" & gt; Click here & lt; / A & gt;
http://google.com
& lt; A Href = "javascript: zero (0)" onclic = "alert ('myFunc executed'); myFunc (); window.location = 'http: //google.com'" & gt; Click here & lt; / A & gt;
Javascript: zero (0) is to see a link.
Comments
Post a Comment