Wednesday, 29 August 2012

pass value from html to java script


<HTML>
<HEAD>
<TITLE> Pass value from HTML to JavaScript </TITLE>
<script language="JavaScript" >
function hello(name)
{
         alert("Hello! "+name);
}
</script>
</HEAD>
<BODY>
Get Hello Message<br>
<input type="button" onclick='hello("sateesh");' value="Click"/>
</BODY>
</HTML>

No comments:

Post a Comment