写个js控制就ok了撒
不难
不难
解决方案 »
- 请教一个cookie的问题
- mysql中关于utf-8与GB2312的问题!
- 请教关于php不能正确显示中文的问题(急)
- post提交的action地址带参,那是属于post还是get
- 求正则表达式 匹配<script >中间没有“<script >”</script>
- 分页到第二页就取不到session,急了,大家帮个忙
- 请问windows下怎么样才能在PHP5的GD库中加入FreeType库?
- 大家好!能帮我一下么?我是初学者!
- php.ini里magic_quotes_gpc这个设置有什么用?
- 支持php权限的免费空间,是否对php的运行时间有限制?
- PHP, 能否打开其他网站的Access?
- 对wget熟的进
function update(){
if(document.getElementById("checkbox").checked==true){
document.getElementById("netmask").disabled="";
document.getElementById("gateway").disabled="";
document.getElementById("servername").disabled="";
document.getElementById("ip").disabled="";
}else{
document.getElementById("netmask").disabled="disabled";
document.getElementById("gateway").disabled="disabled";
document.getElementById("servername").disabled="disabled";
document.getElementById("ip").disabled="disabled";
}
}
</script>
<table width="80%" height="125" border="0" align="center" cellpadding="0" cellspacing="0" >
<tr><FORM name="admin" method="post" action="xitongok.php">
<?php
$fp= fopen("/www/imgserver/setting.cfg","r");
fscanf($fp,"[network]");
fscanf($fp,"nic=nic0");
fscanf($fp,"[nic0]");
fscanf($fp,"dhcp=1");
fscanf($fp,"ip=%s",$ip);
fscanf($fp,"mac=00-0C-E0-F0-3C-0F");
fscanf($fp,"netmask=%s",$netmask);
fscanf($fp,"gateway=%s",$gateway);
fscanf($fp,"[server]");
fscanf($fp,"name=%s",$servername);
fscanf($fp,"[control]");
fscanf($fp,"restart=0");
fclose($fp);
?>
<td height="125" >
<label>
<input type="checkbox" name="checkbox" value="checkbox" onClick="update()" id="checkbox">修改
</label>
<table width="87%" height="73" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td width="44%" height="24" align="right" >IP地址:</td>
<td width="56%" align="left" ><input name="ip" type="text" id="ip" value="<?php echo $ip?>" onBlur="check_ip(this.value)" disabled="disabled"/></td>
</tr>
<tr>
<td width="44%" height="24" align="right" >子网掩码:</td>
<td width="56%" align="left" ><input name="netmask" type="text" id="netmask" value="<?php echo $netmask?>" onBlur="check_ip(this.value)" disabled="disabled"/></td>
</tr>
<tr>
<td width="44%" height="24" align="right" >默认网关:</td>
<td width="56%" align="left" ><input name="gateway" type="text" id="gateway" value="<?php echo $gateway?>" onBlur="check_ip(this.value)" disabled="disabled"/></td>
</tr>
<tr>
<td height="24" align="right" >服务器别名:</td>
<td align="left" ><input name="servername" type="text" id="servername" value="<?php echo $servername;?>" disabled="disabled"/></td>
</tr>
</table>
<table width="87%" height="24" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
<td height="25" align="center" ><input name="tijiao" type="submit" class="btn" border="0" value="确 定">
</td>
</tr>
</table></td></FORM>
<html>
<body>
<input name="t1" type="text" id="t1"/>
<input name="c1" type="checkbox" id="c1" value="checkbox" onclick="setthis(this.checked)" />
</body>
</html>
<script language="javascript">
function setthis(n)
{
alert(n);
if(n)
{
document.getElementById("t1").disabled="disabled";
}
else
{
document.getElementById("t1").disabled = false;
}
}
</script>