如何通过javascript把textarea表单的只读属性去掉

Author:Aaron | Update:2004-9-28

使用
document.form1.textarea1.readonly = false;
想把textarea1的只读属性去掉,总是
不成功,
用alert(document.form1.textarea1.readonly)查看他
原来的属性,但结果是“undefined”
为什么我不能找到textarea的只读属性能。
请问如何修改。

--------------------------------------------------------------------------------
大小写错误,应该为document.form1.textarea1.readOnly
--------------------------------------------------------------------------------
document.form1.textarea1.readOnly = false;


--------------------------------------------------------------------------------

document.form1.textarea1.removeAttribute("readonly");

--------------------------------------------------------------------------------

通过脚本访问的属性都区分大小写

readOnly Property Internet Development Index

--------------------------------------------------------------------------------

Retrieves whether the rule or style sheet is defined on the page or is imported.

Syntax

[ bReadOnly = ] object.readOnly
Possible Values

bReadOnly Boolean that receives one of the following values.false Default. Rule or style sheet is obtained through a link object or the @import rule.
true Rule or style sheet is defined on the page.


The property is read-only. The property has a default value of false.

Remarks

You cannot modify style sheets obtained through a link object or the @import rule while the designMode property is enabled. For more information, see Introduction to MSHTML Editing.

Standards Information

This property is defined in World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 .

Applies To

[ Object Name ]
Platform Version
Win16:
Win32:
Windows CE:
Unix:
Mac:
Version data is listed when the mouse hovers over a link, or the link has focus.
styleSheet, rule
Move the mouse pointer over an element in the Applies To list to display availability information for the listed platforms.

Permalink:http://blue.fhuang.com/blue/Blog/23.asp
TrackBacks:
Add to Favorites | Comments:1 |TrackBacks:0 | Hits:... « ... | RSS订阅 | 下一篇 »
  The comments are loading...
Google
Copyright©2003-2007 Aaron. Some Rights Reserved. Skin Reserved by Aaron | 京ICP备05061640号
Powered by ABlog V3.1 | Processed in 0.000000 Seconds. | 0 Queries
Top