87,993
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript" src="JS/jquery-1.3.2.1.min.js"></script>
<script type="text/javascript">
$(function()
{
$("[type=button]").click(function()
{
alert('1');
});
});
</script>
</head>
<body>
<input type="button" value="测试" onclick="alert('2')" />
</body>
</html>
var fun=$("[type=button]")[0].onclick;
$("[type=button]")[0].onclick=function() {
alert("1");
fun();
}