2011-05-02 31 views
-1

我们正在艰难的时间来解决这个问题。

$('document').value="" 

在IE中没有赋值给空字符串。但是这在FF中运行良好。

+1

我不知道Protoype.js,但是如果$('document')'选择了'document'对象,那么问题是为什么你要为它设置'value'?它没有这样的财产。 – 2011-05-02 09:29:30

+1

@Felix:no,'$('document')'就像'document.getElementById('document')' – 2011-05-02 09:31:01

+1

@user:你能告诉我们你的标记(特别是包含表单的部分)吗? – 2011-05-02 09:31:44

回答

-1

它应该是$(document).attr('value','')可能,但我不明白你为什么要为文档对象赋值属性。

+1

'$('document')'选择一个ID为'document'的元素。 – Lekensteyn 2011-05-02 09:33:23

+0

并没有'attr'方法 – Quentin 2011-05-02 09:34:53

+0

嗯没有注意到它的原型 – 2011-05-02 09:39:18

相关问题