<html>
<head>
<title>title of the html</title>
<body>
<script type="text/javascript">
var button1;
var button2;
function onclic1(){
button1=document.getElementById("button1");
if(button1.value=="button1"){
alert("you have put the button1 down !");
}
}
function onclic2(){
button2=document.getElementById("button2");
if(button2.value=="button2"){
alert("you have put the button2 down !");
}
}
</script>
<tr>
<td>
<input type="button" id="button1" value="button1" οnclick="onclic1()"/>
<input type="button" id="button2" value="button2" οnclick="onclic2()" />
</td>
</tr>
</body>
</head>
</html>
第一个javascript程序
最新推荐文章于 2024-03-07 10:05:08 发布