我有一个对话框,它有两个按钮,一个继续,一个取消。为什么我的对话框只能工作一次?
$(document).ready(function(){
$("[name=resetPwd]").click(function(){
var id = $(this).attr("userid");
var email = $("[field=emailAddress].[userid="+id+"]").text();
var name = $("[field=firstName].[userid="+id+"]").text();
var message = $('<div></div>')
.html('You are about to reset the password for:<br/>'+name+'.<br/>This will send an e-mail to:<br/>'+
email+'<br/><br/><input id="_continue" type="button" value="Continue" /> <input id="_cancel" type="button" value="Cancel" />')
.dialog({
title: 'Reset Password'
});
message.dialog('open');
$("#_cancel").click(function(){
message.dialog('close');
});
});
它工作得很好,(第一次)我所有的数据是存在的,当我点击取消,它关闭,但如果我尝试再次取消犯规了做任何事情。有谁知道我做错了什么?请致电
当我在点击处理程序之外创建对话框时,它会在每个页面上自动打开。有没有办法让它只能用于这一页即时工作? – Dagron
谢谢你一直工作 – Dagron
不客气。真高兴你做到了。 – BZink