如何设置页面加载时Table内容为只读 急救!!!我想让页面一加载时Table中的内容均为只读?点击按钮后改为可编辑望高手指点 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Foreach Table所有控件 设置readonly属性 <input type="text" value="sdf" /><table border="1" id="ss" borad="1"><tr><td><input type="text" value="sdf"></td></tr><tr><td><input type="text" value="sdf"></td></tr></table><input type="button" value="编辑table" onclick="set_disabled(false)"/><input type="button" value="锁定table" onclick="set_disabled(true)"/><script language="javascript">function set_disabled(boolean){ var es=document.getElementById("ss").all; for(i=0;i<es.length;i++){ es[i].disabled=boolean }}set_disabled(true);</script> <html xmlns="http://www.w3.org/1999/xhtml"><head> <title></title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> function setDisabled(bo) { $("#table1 :input").attr("disabled",bo); } </script></head><body> <input id="Button1" type="button" value="启用" onclick="setDisabled(false)" /> <input id="Button2" type="button" value="禁用" onclick="setDisabled(true)" /> <table id="table1" > <tr> <td> <input id="Text1" type="text" /> </td> <td> <input id="Password1" type="password" /> </td> </tr> <tr> <td> <select id="Select1"> <option>1</option> </select> </td> <td> <input id="Checkbox1" type="checkbox" /> <input id="Radio1" type="radio" /> </td> </tr> <tr> <td> <input id="File1" type="file" /> </td> <td> <textarea id="TextArea1" cols="20" rows="2"></textarea> </td> </tr> </table></body></html> radio单选按钮替换问题 页面后退问题!!!急!!急 javascript 带checkbox的 翻页,如何保存到上一页记录的id? 100分,谁可以实现这个效时 一个简单的JS问题,在线等,立刻给分! getelement getElementsByTagName Javascript如何实现内嵌HTML代码 JavaScript极速狂飙:大容量字符型数组的快速检索_meizz ActiveXObject为什么不能运行客户端程序? 如何做网页过期 求修改一个简单的AS脚本,实现点击变色删除 OYE - AMD模块化开发思想的实现原理及应用
<table border="1" id="ss" borad="1">
<tr><td><input type="text" value="sdf"></td></tr>
<tr><td><input type="text" value="sdf"></td></tr>
</table>
<input type="button" value="编辑table" onclick="set_disabled(false)"/>
<input type="button" value="锁定table" onclick="set_disabled(true)"/>
<script language="javascript">
function set_disabled(boolean){
var es=document.getElementById("ss").all;
for(i=0;i<es.length;i++){
es[i].disabled=boolean
}
}
set_disabled(true);</script>
<head>
<title></title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
function setDisabled(bo) {
$("#table1 :input").attr("disabled",bo);
}
</script>
</head>
<body>
<input id="Button1" type="button" value="启用" onclick="setDisabled(false)" />
<input id="Button2" type="button" value="禁用" onclick="setDisabled(true)" />
<table id="table1" >
<tr>
<td>
<input id="Text1" type="text" />
</td>
<td>
<input id="Password1" type="password" />
</td>
</tr>
<tr>
<td>
<select id="Select1">
<option>1</option>
</select>
</td>
<td>
<input id="Checkbox1" type="checkbox" />
<input id="Radio1" type="radio" />
</td>
</tr>
<tr>
<td>
<input id="File1" type="file" />
</td>
<td>
<textarea id="TextArea1" cols="20" rows="2"></textarea>
</td>
</tr>
</table>
</body>
</html>