<html>
<head>
<title>document.write</title>
<script>
function show(){
alert("hello");
}
//直接调用
//show();
//事件响应
//function add(var x,var y) 不正确的写法
function add(x,y){
return (x + y);
}
alert(add(1,3));
</script>
</head>
<body>
<!--事件响应-->
<input type ="button" value="click" onclick="show()"/>
</body>
</html>
javascript的函数调用
最新推荐文章于 2025-08-08 17:07:36 发布