请问我的一个前台的js取值问题!! var str1str1=i.valueif(radio.checked=true){ text2.value=str1 & "A"}else{ text2.value=str1 & "B"} 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不知是不是这个意思----------------------------------<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta name="GENERATOR" content="Microsoft FrontPage 4.0"><meta name="ProgId" content="FrontPage.Editor.Document"><title>New Page 1</title><script>function show(){ var obj1=document.all("R1"); var obj2=document.all("R2"); if(obj1.checked==true) { document.all("T2").value=document.all("i").name+"+'A'"; } else(obj1.checked==true) { document.all("T2").value=document.all("i").name+"+'B'"; }}</script></script></head><body onload="show();"><form method="POST" action="" name="Form1"> <p><input type="text" name="i" size="20" value="aaaa"></p></form><form method="POST" action="" name="Form2"> <p><input type="radio" value="A" name="R1"><input type="radio" value="B" checked name="R2"></p></form><form method="POST" action="" name="Form3"> <p><input type="text" name="T2" size="20"></p></form></body></html> 是判断radio的value么?<SCRIPT LANGUAGE="JavaScript"><!-- function clk() { if( form1.r1.value != 0 ) form1.t1.value = form1.i.value + "A" else form1.t1.value = form1.i.value + "B" }//--></SCRIPT><form name=form1> <br><input name=i>i <br><input type=radio name=r1 value=1 onClick="clk()">r1 <br><input name=t1></form> <html><head><script>function add(){ var a=document.getElementsByName("rr") var str="" for(i=0;i<a.length;i++) { if(a[i].checked){str=a[i].value} } f1.t2.value=f1.t1.value+str}</script></head><body><form name="f1" method="POST" action=""> <p> <input type="text" name="t1" size="20"><input type="radio" value="A" checked name="rr">A<input type="radio" name="rr" value="B">B</p> <p><input type="text" name="t2" size="20"></p> <p><input type="button" value="按钮" name="B1" onclick="add()"></p></form></body></html> 参见如下程序:_______________________________________________________________<script>function doit(){bbvalue=document.aa.source1.value;if(document.aa.source2[0].checked)bbvalue+=document.aa.source2[0].value;else bbvalue+=document.aa.source2[1].value;document.bb.showit.value=bbvalue;return false;}</script><form name=aa onclick="return doit()"><input type=text name=source1><input type=radio value='radio1' name=source2><input type=radio value='rado2' name=source2><input type=submit value=ok></form><form name=bb><textarea name=showit></textarea></form>__________________________________________________________ js 获取当前鼠标位置 JS的onlaod事件问题 下拉框 DOcument对象为空或者不是对象 Jstorag e的本地大数据存储 ((int)(Math.random()*100)+1)%26-1 一个多级的弹出式菜单,欢迎给意见 快救我,点击图像按钮,先对form里的文本框校检,通过的话就提交,不通过就提示,怎么做呢? 请教高人! 100分 浮动页面 关于窗口的问题! 关于子窗口返回值的问题
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
<script>
function show()
{
var obj1=document.all("R1");
var obj2=document.all("R2");
if(obj1.checked==true)
{
document.all("T2").value=document.all("i").name+"+'A'";
}
else(obj1.checked==true)
{
document.all("T2").value=document.all("i").name+"+'B'";
}
}
</script>
</script>
</head><body onload="show();"><form method="POST" action="" name="Form1">
<p><input type="text" name="i" size="20" value="aaaa"></p>
</form>
<form method="POST" action="" name="Form2">
<p><input type="radio" value="A" name="R1"><input type="radio" value="B" checked name="R2"></p>
</form>
<form method="POST" action="" name="Form3">
<p><input type="text" name="T2" size="20"></p>
</form></body></html>
<!--
function clk()
{
if( form1.r1.value != 0 )
form1.t1.value = form1.i.value + "A"
else
form1.t1.value = form1.i.value + "B"
}
//-->
</SCRIPT><form name=form1>
<br><input name=i>i
<br><input type=radio name=r1 value=1 onClick="clk()">r1
<br><input name=t1>
</form>
<script>
function add()
{
var a=document.getElementsByName("rr")
var str=""
for(i=0;i<a.length;i++)
{
if(a[i].checked){str=a[i].value}
}
f1.t2.value=f1.t1.value+str
}
</script>
</head><body><form name="f1" method="POST" action="">
<p>
<input type="text" name="t1" size="20"><input type="radio" value="A" checked name="rr">A<input type="radio" name="rr" value="B">B</p>
<p><input type="text" name="t2" size="20"></p>
<p><input type="button" value="按钮" name="B1" onclick="add()"></p>
</form></body></html>
_______________________________________________________________
<script>
function doit(){
bbvalue=document.aa.source1.value;
if(document.aa.source2[0].checked)
bbvalue+=document.aa.source2[0].value;
else
bbvalue+=document.aa.source2[1].value;
document.bb.showit.value=bbvalue;
return false;
}
</script>
<form name=aa onclick="return doit()">
<input type=text name=source1>
<input type=radio value='radio1' name=source2>
<input type=radio value='rado2' name=source2>
<input type=submit value=ok>
</form>
<form name=bb>
<textarea name=showit></textarea>
</form>
__________________________________________________________