解决方案 »
- extjs的问题??????我要实现两个表格直间的拖放。还要加什么代码啊???我是新手!那位高手帮帮我啊
- 画面与dialog中同时使用jquery插件
- 怎能讓IE6能正常讀取 png 圖檔
- javascript中如何调用自己编译的DLL后缀文件
- 如何javascript触发TEXT的onblur事件?
- 版主showbo 你好 谢谢您的帮助 有个问题还需要向你请教一下
- 请问在FireFox中,怎样使用iframe开的帧页,没有横向的滚动条呢?
- 用javascript我如何取得DIV下的控件
- 页面刷新问题,急,谢谢~~
- 在javascript中怎么表示服务器变量? var s = <% =myServerVar %>; 的形式怎么不对?
- 首页图片自动翻页js代码,理解了基本函数功能,但不知具体细节,请大家帮忙深入理解
- 如何用脚本实现iPhone的特效?
$("input[type=text]").hide();
$("#txt").show();
});
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>test</title>
<script>
function c(o){
if(o.checked){
var on = o.nextSibling;
if(on.style.display!='none'){
return;
}else{
on.style.display = "inline";
var os = document.getElementsByName(o.name);
for(var i=0;i<os.length;i++){
if(os[i]!=o){
on = os[i].nextSibling;
on.style.display = "none";
}
}
}
}
}
</script>
</head><body>
<input type="radio" name="r1" onclick="c(this)" value="1" checked><span>1</span>
<input type="radio" name="r1" onclick="c(this)" value="2"><span style="display:none">2</span>
<input type="radio" name="r1" onclick="c(this)" value="3"><span style="display:none">3</span>
<input type="radio" name="r1" onclick="c(this)" value="4"><span style="display:none">4</span>
<input type="radio" name="r1" onclick="c(this)" value="5"><span style="display:none">5</span>
<br>
<input type="radio" name="r2" onclick="c(this)" value="1" checked><span>一</span>
<input type="radio" name="r2" onclick="c(this)" value="2"><span style="display:none">二</span>
<input type="radio" name="r2" onclick="c(this)" value="3"><span style="display:none">三</span>
<input type="radio" name="r2" onclick="c(this)" value="4"><span style="display:none">四</span>
<input type="radio" name="r2" onclick="c(this)" value="5"><span style="display:none">五</span>
</body></html>
跟我想要的不太一样
具体说一下<form name="form1" action="test.php" method="post" >
<tr>
<td>是否要截取链接</td>
<td><input type="radio" name="sub" value="1">截取</td> <td><input type="radio" name="sub" value="2" />不截取</td></tr>
<input type="submit" />
我想当选则截取时,出现文本框输入截取规则<input typy="text" name="sub"/>
而且我想接收这个截取规则的值
$("#sub").toggle();--- 输入截取规则<input typy="text" name="sub" id="sub" style="display:none"/> })就不用JS写了啊,JS比较麻烦
$("#sub").toggle();--- 输入截取规则<input typy="text" name="sub" id="sub" style="display:none"/>})
没实验,应该是好使的 <td><input type="radio" name="sub" value="2" />不截取</td>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head><body>
<form name="form1" action="test.php" method="post" >
<tr>
<td>是否要截取链接</td>
<td><input type="radio" name="sub" value="1" id="sub" onClick="changeType(true);">截取<input type="text" name="sub1" id="sub1" style="display:none;"/></td> <td><input type="radio" name="sub" value="2" onClick="changeType(false);"/>不截取</td></tr>
<input type="submit" />
</form>
<script type="text/javascript">
function changeType(jiequ)
{
var objSub=document.getElementById("sub");
var objSub1=document.getElementById("sub1");
if(jiequ)
{
objSub.style.display="none";
objSub1.style.display="block";
}
else
{
objSub.style.display="block";
objSub1.style.display="none";
}
}
</script>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head><body>
<form name="form1" action="test.php" method="post" >
<div style="width:auto;height:30px;">
<div style="width:120px;height:30px;float:left;">是否要截取链接</div>
<div style="width:auto;float:left;"><input type="radio" name="sub" value="1" id="sub" onClick="changeType(true);"></div>
<div style="width:auto;float:left;">截取</div>
<div style="width:auto;float:left"><input type="text" name="sub1" id="sub1" style="display:none;"/></div>
<div style="width:auto;float:left;margin-left:10px;display:inline;"><input type="radio" name="sub" value="2" onClick="changeType(false);"/>不截取</div>
<div style="widows:auto;float:left;margin-left:10px;display:inline;"><input type="submit" /></div>
</div>
</form>
<script type="text/javascript">
function changeType(jiequ)
{
var objSub=document.getElementById("sub");
var objSub1=document.getElementById("sub1");
if(jiequ)
{
objSub.style.display="none";
objSub1.style.display="block";
}
else
{
objSub.style.display="block";
objSub1.style.display="none";
}
}
</script>
</body>
</html>