TextButton Chooses New URL

[Total: 0    Average: 0/5]

This example sends the user to a new web page based upon the value of the button the user clicks upon.

Body Code:

<form name=exf1>
<input type="button" name="txtbutton" value="Page1" onClick="call_do()"> 
<input type="button" name="txtbutton" value="Page2" onClick="call_do()"> 
function call_do() { 
var myform=document.exf1;
var myval = myform.txtbutton.value;
if (myval=="Page1") 
else if (myval="Page2") 

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *