js按钮实现点击:
方式一:标签上写方法
<input type="button" name="" onclick="clickAddOne();" value="有种点我啊!!" />
<script type="text/javascript">
function clickAddOne(){
alert("卧槽,被点了");
}
</script>
方式二:通过id绑定
<div style="text-align:center;">
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" id="dw_dhzy_form_savebt" style="width:120px">保存</a>
<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" id="dw_dhzy_form_cancelbt" style="width:120px">取消</a>
</div>
<script type="text/javascript">
$("#dw_dhzy_form_cancelbt").bind('click', function() {
$('#dw_dhzy_add_div').window('destroy'); //销毁dialog
window.close();
})
$("#dw_dhzy_form_savebt").bind('click', function() {
saveBtn();
});
</script>