【发布时间】:2011-10-02 17:10:32
【问题描述】:
好的,我有这个:
$('a[name=writecommentsmodal]').live('click',function(e) {
e.preventDefault();
var date=new Date();
var currdate=date.getYear()+" "+date.getMonth+" "+date.getDate();
var comm=new addComment("",fullname,currdate,$ ***("#inputspace2").text()) ***;
comm.appendComment($(".wallpostcontainer"));
});
我正在尝试从 inputspace2 获取文本。 inputspace2 是在按下按钮时动态创建的(该按钮是 'a[name=writecmetsmodal]')。该按钮也恰好是从不同的按钮单击动态创建的(因此使用实时),但我离题了。当我单击模态按钮时,那个 inputspace2.text 是空的。我如何访问它?在萤火虫它的“”。我在想也许不得不再次使用 live 但我没有
【问题讨论】:
标签: jquery modal-dialog