<head>
<script language="javascript">
function HideWeekMonth()
{
$("#tt1").hide();
$("#tt2").hide();
}
</script>
</head>
<body onLoad="HideWeekMonth()">
</body>
<td>
<!-- 能用
<input id="btnShow" type="button" value="<?php echo $ini_array['module.insert'];?>" class="btn" />
<input id="btnHide" type="button" value="<?php echo $ini_array['module.insert'];?>" class="btn" />
-->
<!-- 直接使用按钮的id没有问题
<input id="tt" type="text" name="title" maxlength="50" size="50"></td> -->
<input id="btnOne" type="radio" name="frequence" value="1" checked='checked'><?php echo $ini_array['time.one']?>
<input id="btnDay" type="radio" name="frequence" value="2"><?php echo $ini_array['time.day']?>
<input id="btnWeek" type="radio" name="frequence" value="3"><?php echo $ini_array['time.week']?>
<input id="btnMonth" type="radio" name="frequence" value="4"><?php echo $ini_array['time.month']?>
<br>
<!-- 能用
<div id="tt1"><input type="text" name="title" maxlength="50" size="50" value="tt1"></div>
<div id="tt2"><input type="text" name="title" maxlength="50" size="50" value="tt2"></div>
-->
<div id="tt1">
<br>
1 <input type="checkbox" value="1" name="w1">
2 <input type="checkbox" value="1" name="w2"> </div>
<div id="tt2">
03 <input type="checkbox" name="m3">
04 <input type="checkbox" name="m4"> </div>
</td>
<!-- 绑定事件似乎要写在被绑定对象的后面 -->
<script type="text/javascript" >
$("#btnOne").bind("click", function(event) { $("#tt1").hide(); $("#tt2").hide(); });
$("#btnDay").bind("click", function(event) { $("#tt1").hide(); $("#tt2").hide(); });
$("#btnWeek").bind("click", function(event) { $("#tt1").show(); $("#tt2").hide(); });
$("#btnMonth").bind("click", function(event) { $("#tt1").hide(); $("#tt2").show(); });
</script>
<script type="text/javascript" src="../../scripts/jquery.min.js"></script>
$("#id").show()表示display:block,
$("#id").hide()表示display:none;
$("#id").css('display','none');
$("#id").css('display','block');
$("#id")[0].style.display = 'none';
$("#demo").attr("style","display:block;");//显示div
$("#demo").css("display","block");//显示div
$("#demo").show();//显示div
function () {
$(this).attr("style","display:none;");//隐藏div
},
function () {
$(this).attr("style","display:block;");//显示div
}
);
<div id="demo"></div>
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有