<html>
<head>
<title>java</title>
<script>
function demo()
{
a=document.getElementById("a").value;
b=document.getElementById("b").value;
c=a+b;
document.getElementById("c").value=c;
}
</script>
</head>
<body>
<input type="text" id="a">
<input type="text" id="b">
<br><br>
<input type="text" id="c" disabled=disabled>
<input type="button" value="click" onclick="demo();">
</body>
</html>
No comments:
Post a Comment