解决方案 »
- 请教有关JS冲突的问题!
- 主从表的editorGrid数据的保存?
- 如何用javascript 获得客户端的jre的版本
- 一个有关时钟的问题,既可以用鼠标拖动表盘上的分针或者时针,得到时间,也可以通过输入时间来对时针和分针进行定位
- (挑战性问题)如何实现:生成一个网页的缩略图, 比如我想打开一个页面(见内)!
- 如何利用javascript记住当前页中所有控件的状态?
- 怎样在客户端控制根据不同的值Form表单提交到不同的ASP页面?
- 请问excel的各种图表对应的报表对应的数值是多少?例如 xl3dColumn=-4100
- 帮小弟看看这段程序!!!
- 求救!网页顶部出现莫名JS
- 未结束的字符串常量
- 【求助】一个form表单上传的问题,放在iframe里,后台没有反应咯。。。谢谢咯。。求助
大家可以去我的博客
http://blog.csdn.net/wansijie
http://www.verycd.com/topics/2754841/自己去下载吧..
<head runat="server">
<title>无标题页</title>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){ load(); });
function load()
{
var controlShow = function(){
if ($("#cbType1CreditDesc").attr("checked") == true) {
$("#cbType1PriceAsc").css("display", "inline-block");
$("#labType1PriceAsc").css("display", "inline-block");
}
else {
$("#cbType1PriceAsc").css("display", "none");
$("#labType1PriceAsc").css("display", "none");
}
if ($("#cbType2PriceAsc").attr("checked") == true) {
$("#cbType2CreditDesc").css("display", "inline-block");
$("#labType2CreditDesc").css("display", "inline-block");
}
else {
$("#cbType2CreditDesc").css("display", "none");
$("#labType2CreditDesc").css("display", "none");
}
if ($("#cbType3PriceDesc").attr("checked") == true) {
$("#cbType3CreditDesc").css("display", "inline-block");
$("#labType3CreditDesc").css("display", "inline-block");
$("#cbType3CreditDesc>lable").css("display", "inline-block");
}
else {
$("#cbType3CreditDesc").css("display", "none");
$("#labType3CreditDesc").css("display", "none");
}
}
$("#cbType1CreditDesc").click(function(){ controlShow();});
$("#cbType2PriceAsc").click(function(){ controlShow(); });
$("#cbType3PriceDesc").click(function(){ controlShow(); });
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div style="text-align: center">
<table border="0" cellpadding="0" cellspacing="0" style="width: 760px">
<tr>
<td colspan="2" style="height: 18px; text-align: left">
<span style="color: #ff00ff">排序方式</span></td>
</tr>
<tr>
<td style=" height: 20px">
<span style="color: #009900">方式一</span></td>
<td style=" color: #000000; height: 20px; text-align: left">
<asp:RadioButton ID="cbType1CreditDesc" runat="server" Text="卖家信用从高到低" GroupName="fang" />
<input id="cbType1PriceAsc" type="checkbox" style="display:none;"/>
<asp:Label ID="labType1PriceAsc" runat="server" Text="并且商品价格由低到高"></asp:Label></td>
</tr>
<tr style="color: #000000">
<td>
<span style="color: #009900">方式二</span></td>
<td style=" text-align: left">
<asp:RadioButton ID="cbType2PriceAsc" runat="server" Text="商品价格从低到高" GroupName="fang" />
<input id="cbType2CreditDesc" type="checkbox" style="display:none;"/>
<asp:Label ID="labType2CreditDesc" runat="server" Text="并且卖家信用从高到低"></asp:Label></td>
</tr>
<tr style="color: #000000">
<td style=" height: 19px">
<span style="color: #009900">方式三</span></td>
<td style=" height: 19px; text-align: left">
<asp:RadioButton ID="cbType3PriceDesc" runat="server" Text="商品价格从高到低" GroupName="fang" />
<input id="cbType3CreditDesc " type="checkbox" style="display:none;" />
<asp:Label ID="labType3CreditDesc" runat="server" Text="并且卖家信用从高到低"></asp:Label></td>
</tr>
</table>
</div>
</form>
</body>
</html>
我拷贝你的,不知道为什么不行?
不好意思啊,我一下没看懂你的意思
要保证代码的正确首先要确认你的选择器是否选择好。
就是$('#div') 是否选择到你要的元素(节点)。
jquery.js <- 这个你肯定是JQuery的js文件吗?
我喜欢这句。
多了一个空格应为 <input id="cbType3CreditDesc" type="checkbox" style="display:none;" />