L@_@K
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> new document </title>
<meta name="generator" content="editplus" />
<meta name="author" content="Gao YiXiang" />
<meta name="email" content="[email protected]" />
<meta name="keywords" content="javascript dhtml dom" />
<meta name="description" content="I love web development." />
</head>
<body>
<input type="radio" name="typeGroup" id="radType01" value="type01" /><label for="radType01">Type 01</label>
<input type="radio" name="typeGroup" id="radType02" value="type02" /><label for="radType02">Type 02</label>
<input type="radio" name="typeGroup" id="radType03" value="type03" /><label for="radType03">Type 03</label><br />
<input type="button" id="btnNext" value="Next" />
<script type="text/javascript">
<!--
btnNext.onclick=function()
{
var rads = document.getElementsByName("typeGroup");
var selectedValue = "";
for (var i=0; i<rads.length; i++)
{
if (rads[i].checked)
{
selectedValue = rads[i].value;
break;
}
}
if (selectedValue == "")
{
alert("Please select one type!");
}
else
{
alert("You select " + selectedValue);
}
};
//-->
</script>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> new document </title>
<meta name="generator" content="editplus" />
<meta name="author" content="Gao YiXiang" />
<meta name="email" content="[email protected]" />
<meta name="keywords" content="javascript dhtml dom" />
<meta name="description" content="I love web development." />
</head>
<body>
<input type="radio" name="typeGroup" id="radType01" value="type01" /><label for="radType01">Type 01</label>
<input type="radio" name="typeGroup" id="radType02" value="type02" /><label for="radType02">Type 02</label>
<input type="radio" name="typeGroup" id="radType03" value="type03" /><label for="radType03">Type 03</label><br />
<input type="button" id="btnNext" value="Next" />
<script type="text/javascript">
<!--
btnNext.onclick=function()
{
var rads = document.getElementsByName("typeGroup");
var selectedValue = "";
for (var i=0; i<rads.length; i++)
{
if (rads[i].checked)
{
selectedValue = rads[i].value;
break;
}
}
if (selectedValue == "")
{
alert("Please select one type!");
}
else
{
alert("You select " + selectedValue);
}
};
//-->
</script>
</body>
</html>
解决方案 »
- Could not find action or result
- 用javascript写asp效率怎么样?
- discuz html转ubb
- 紧急求助swfobject问题
- 如何不显示浏览器状态栏中的信息!
- 网页里播放avi,wmv,rm,mov等视频,请问如何用脚本控制播放,暂停,快进,快退,以及音量等,最好能有相关的资料。
- 请问如何在一个页面去执行另外一个页面的JS
- javascript代码,编辑、跟踪都有什么工具?谢谢。
- 高分求解,用JAVASCRIPT能实现搜索引擎功能吗?
- 试了好多次了 请问如何检查一个新建的窗口是否存在
- 求助关闭弹出窗口刷新父窗口的问题!!!!!!!
- 如何获得光标附近的text的字体,做过html编辑器的来
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title> new document </title>
<meta name="generator" content="editplus" />
<meta name="author" content="Gao YiXiang" />
<meta name="email" content="[email protected]" />
<meta name="keywords" content="javascript dhtml dom" />
<meta name="description" content="I love web development." />
</head>
<body>
<input type="radio" name="typeGroup" id="radType01" value="type01" /><label for="radType01">Type 01</label>
<input type="radio" name="typeGroup" id="radType02" value="type02" /><label for="radType02">Type 02</label>
<input type="radio" name="typeGroup" id="radType03" value="type03" /><label for="radType03">Type 03</label><br />
<input type="button" id="btnNext" value="Next" />
<script type="text/javascript">
<!--
var rads = document.getElementsByName("typeGroup");
var selectedValue = "";
for (var i=0; i<rads.length; i++)
{
rads[i].onclick = function()
{
btnNext.disabled = false;
}; if (rads[i].checked)
{
selectedValue = rads[i].value;
break;
}
}
if (selectedValue == "")
{
btnNext.disabled = true;
}
//-->
</script>
</body>
</html>
<input type="radio" name="typeGroup" value="type02" onclick="submit.disabled = false;"/>Type 02<input type="submit" id="submit" value="submit" disabled />
<head>
<title> new document </title>
</head>
<body>
<input type="radio" name="typeGroup" id="radType01" value="type01" onclick="document.getElementById('btnNext').disabled=false;" /><label for="radType01">Type 01</label>
<input type="radio" name="typeGroup" id="radType02" value="type02" onclick="document.getElementById('btnNext').disabled=false;" /><label for="radType02">Type 02</label>
<input type="radio" name="typeGroup" id="radType03" value="type03" onclick="document.getElementById('btnNext').disabled=false;" /><label for="radType03">Type 03</label><br />
<input type="button" id="btnNext" value="Next" disabled>
</body>
</html>
大虾快教教我,TKS