2011-05-02 24 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

相關問題