<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script type="text/javascript"src="js/jquery-1.11.1.min.js"></script>
<title></title>
</head>
<body>
<input type="button"name="button"id="button"value="普通按钮"/>
<script type="text/javascript">
$(document).ready(function(){
$("input:button").bind("click",function(event,msg1,msg2){
alert(msg1+msg2);
}).trigger("click",["欢迎访问","明日科技"]);
});
</script>
</body>
</html>
模拟用户的操作触发事件
最新推荐文章于 2022-07-12 21:24:46 发布