<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html140/strict.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=gb2312"/> <title>Sample Page!</title> <mce:script language="JavaScript" type="text/javascript"><!-- function TestEvent() { document.MyForm.text1.removeAttribute("disabled"); //移除disable属性. document.MyForm.text1.value="enable";//改变文本框中的文字. } // --></mce:script> </head> <body> <form name="MyForm" action=""> <input type="text" name="text1" value="disabled" disabled="disabled"/> <input type="button" name="MyButton" value="MyTestButton" onclick="TestEvent()"/> </form> </body> </html>