<table align="center" width="60%"
style="color: #369; border: #92B0DD 1px solid; margin-top: 30px;"
id="tab">
<tr>
<td colspan="2" align="center"><%=request.getParameter("host")%><%=request.getParameter("zone")%></td>
</tr>
<tr>
<td class="bo_01">
在线设置:
</td>
<td class="bo_01">
<table id=OnlineOpt style="FONT-SIZE: 9pt" border=0>
<tbody>
<tr>
<td>
<input id="OnlineOpt_0" type="radio" checked value="0"
name="OnlineOpt" />
<label for="OnlineOpt_0">
解析到最新的IP上
</label>
</td>
<td>
<input id="OnlineOpt_1" type="radio" value="1"
name="OnlineOpt" />
<label for="OnlineOpt_1">
指定到静态IP上
</label>
</td>
<td>
<input id="OnlineOpt_2" type="radio" value="2"
name="OnlineOpt" />
<label for="OnlineOpt_2">
转发指定的网址
</label>
</td>
</tr>
</tbody>
</table>
静态IP:
<s:textfield id="OnlineIP" name="domain.data" readonly="true" ></s:textfield>
<br />
指定网址:
<s:textfield id="OnlineUrl" name="domain.data" readonly="true"></s:textfield>
</td>
</tr></table>
<script>document.getElementById("OnlineOpt_0").onclick=function()
{
document.getElementById("OnlineIP").readonly=true;
document.getElementById("OnlineUrl").readonly=true;
}
document.getElementById("OnlineOpt_1").onclick=function()
{ document.getElementById("OnlineIP").readonly="false";
document.getElementById("OnlineIP").focus();
document.getElementById("OnlineUrl").readonly="true";}
document.getElementById("OnlineOpt_2").onclick=function()
{
document.getElementById("OnlineIP").readonly=true;
document.getElementById("OnlineUrl").readonly=false;
document.getElementById("OnlineUrl").focus();
}
</script>
style="color: #369; border: #92B0DD 1px solid; margin-top: 30px;"
id="tab">
<tr>
<td colspan="2" align="center"><%=request.getParameter("host")%><%=request.getParameter("zone")%></td>
</tr>
<tr>
<td class="bo_01">
在线设置:
</td>
<td class="bo_01">
<table id=OnlineOpt style="FONT-SIZE: 9pt" border=0>
<tbody>
<tr>
<td>
<input id="OnlineOpt_0" type="radio" checked value="0"
name="OnlineOpt" />
<label for="OnlineOpt_0">
解析到最新的IP上
</label>
</td>
<td>
<input id="OnlineOpt_1" type="radio" value="1"
name="OnlineOpt" />
<label for="OnlineOpt_1">
指定到静态IP上
</label>
</td>
<td>
<input id="OnlineOpt_2" type="radio" value="2"
name="OnlineOpt" />
<label for="OnlineOpt_2">
转发指定的网址
</label>
</td>
</tr>
</tbody>
</table>
静态IP:
<s:textfield id="OnlineIP" name="domain.data" readonly="true" ></s:textfield>
<br />
指定网址:
<s:textfield id="OnlineUrl" name="domain.data" readonly="true"></s:textfield>
</td>
</tr></table>
<script>document.getElementById("OnlineOpt_0").onclick=function()
{
document.getElementById("OnlineIP").readonly=true;
document.getElementById("OnlineUrl").readonly=true;
}
document.getElementById("OnlineOpt_1").onclick=function()
{ document.getElementById("OnlineIP").readonly="false";
document.getElementById("OnlineIP").focus();
document.getElementById("OnlineUrl").readonly="true";}
document.getElementById("OnlineOpt_2").onclick=function()
{
document.getElementById("OnlineIP").readonly=true;
document.getElementById("OnlineUrl").readonly=false;
document.getElementById("OnlineUrl").focus();
}
</script>
解决方案 »
- 为什么我再servlet中System.out.println("这么写都会乱码" ); 固定的中文都会乱码。。。。。。。。
- 急!!做项目有没有视频聊天的代码?
- 关于url重写的问题
- 如何提取FCKEditor中上传图片的地址?
- 好心人给个思路看看~关于复选框的内容
- 如果异常断电的情况发生,怎样才能让发生异常的机器的SESSION在数据库中消失!
- 使用Hibernate时遇到的错误!!!!!!经典
- 如何在Tapestry5中使用JFreeChart来动态显示图片?
- cookie的使用
- 关于 JSP与 JBUILDE 的问题!
- java文件下载时,总停在下载处不动了。请大侠帮忙
- Java 多线程 条件变量
readonly false false false Boolean Whether the input is readonly
<script>document.getElementById("OnlineOpt_0").onclick=function()
{
document.getElementById("OnlineIP").readonly=true;
document.getElementById("OnlineUrl").readonly=true;}
document.getElementById("OnlineOpt_1").onclick=function()
{ document.getElementById("OnlineIP").readonly="false";
document.getElementById("OnlineIP").focus();
document.getElementById("OnlineUrl").readonly="true";}
document.getElementById("OnlineOpt_2").onclick=function()
{
document.getElementById("OnlineIP").readonly=true;
document.getElementById("OnlineUrl").readonly=false;
document.getElementById("OnlineUrl").focus();}
</script>执行之前进行判断啊,举个类子:
document.getElementById("OnlineOpt_0").onclick=function()
{
if(document.getElementById("OnlineIP").readonly==false){
document.getElementById("OnlineIP").readonly=true;
document.getElementById("OnlineUrl").readonly=true;
}else if(document.getElementById("OnlineIP").readonly==true){
document.getElementById("OnlineIP").readonly=false;
document.getElementById("OnlineUrl").readonly=false;
}
}
顺便给你解决$("#id").attr("readonly",true);
$("#id").attr("readonly",false);true 和 false 都不要加 “” 就可以了! 如果加 “” 了 只有true 会起效,false 是不会起效,这就导致你现在的效果!