Display info in a new page : Document : Development JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Development » Document »

 

Display info in a new page



<HTML>
<HEAD>
<SCRIPT language="JavaScript">
<!--
function newpage()
{
 var thename= document.myform.yourname.value;
 var thefood= document.myform.yourfood.value;
 document.open();
 document.write("Your name is "+thename);
 document.write("<BR>");
 document.write("Your favorite food is "+thefood);
 document.close();
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<FORM name="myform">
Name: <INPUT type="text" name="yourname" size="25">
<P>
Favorite Food: <INPUT type="text" name="yourfood" size="25">
<P>
<INPUT TYPE="button" value="Click Here for a New Page" onClick="newpage()">
</FORM>

</BODY>

</HTML>

           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Development
» Document