62,243
社区成员




$("#opener").bind("click", { type: "add" }, showData);
function showData(event) {
if (event.data.type == "add") { //添加数据
//加载数据
getCustmer();
alert("add");
return false;
}
else if (event.data.type == "edit") { //编辑数据
// var id = event.data.id;
// alert(id);
alert("edit");
return false;
}
}
//显示数据
$("#opener").bind("click", { type: "add" }, showData);
$("#aspxGdv_DXMainTable a").bind("click", { type: "edit" }, showData);
function showData(event) {
if (event.data.type == "add") { //添加数据
//加载数据
//getCustmer();
alert("dd5");
return false;
}
else if(event.data.type=="edit"){
alert("dd6");
return false;
}
}
$("#aspxGdv_DXMainTable a").click(function () {
var href = $(this).attr("href"); //获取href 形式 xxx.aspx?id=90;
cusId = href.substring(href.lastIndexOf("=") + 1, href.length); //最终获取修改的ID
//type = "edit"; //标记是修改
$(this).bind("click", { type: "edit" }, showData);
//$("#opener").trigger("click", ["type", "bar"]);
//$("#opener").click();
return false; //取消href的跳转
});
$("#id").trigger("click", ["foo", "bar"]);