为什么onclick只能点击一次,再次点击时就出错了?
<body>
<input type="button" name="" id="" value="点我" onclick="ss()" />
</body>
<script type="text/javascript">
function ss(){
ss = 5-2;
alert("5和2的差:"+ss);
}
</script>
<body>
<input type="button" name="" id="" value="点我" onclick="ss()" />
</body>
<script type="text/javascript">
function ss(){
ss = 5-2;
alert("5和2的差:"+ss);
}
</script>
2019-05-12
举报