事件绑定
dom属性绑定
<input type="button" id = "btn" value="点我"><script> // document.getElementById('myImgine').src = 'images/open.jpg'; document.getElementById("btn").onclick = function(){ alert("我被点了"); } onsubmit返回true则表单被提交返回false则表单不提交 标签:绑定,--,JavaScript,表单,getElementById,document,监听 From: https://www.cnblogs.com/L-1906/p/17825122.html