Sunday, June 27, 2010

Create a student object using java script

Buzz It
<html><head>
<script language ="javascript">
function print()
{
var rollno,name,mark;rollno=Number(text1.value);name=text2.value;mark=Number(text2.value);document.write("Roll No---"+rollno+"<br><br>");
document.write("Name---"+name+"<br><br>");
document.write("Mark---"+mark+"<br><br>");
}</script>
</head><body bgcolor="ivory"><pre>Roll no<input id="text1" type=text>name <input id="text2" type=text>mark <input id="text3" type=text><br><input type=submit value="submit" onClick="print()"></pre></body></html>

OUTPUT

0 comments:

Post a Comment