javascript 中radio不能点击选中 怎么解决
<!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>无标题页</title>
<script type="text/javascript" language="javascript">
function create()
{
var oRad1 = document.createElement("input");
oRad1.setAttribute("type","radio");
oRad1.setAttribute("id","rad1");
oRad1.setAttribute("name","aaa");
var oRad2 = document.createElement("input");
oRad2.setAttribute("type","radio");
oRad2.setAttribute("id","rad2");
oRad2.setAttribute("name","aaa");
document.body.appendChild(oRad1);
document.body.appendChild(oRad2);
}
</script>
</head>
<body>
<input id="Button1" type="button" value="button" onclick="create()" />
</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>无标题页</title>
<script type="text/javascript" language="javascript">
function create()
{
var oRad1 = document.createElement("input");
oRad1.setAttribute("type","radio");
oRad1.setAttribute("id","rad1");
oRad1.setAttribute("name","aaa");
var oRad2 = document.createElement("input");
oRad2.setAttribute("type","radio");
oRad2.setAttribute("id","rad2");
oRad2.setAttribute("name","aaa");
document.body.appendChild(oRad1);
document.body.appendChild(oRad2);
}
</script>
</head>
<body>
<input id="Button1" type="button" value="button" onclick="create()" />
</body>
</html>
搜索更多相关主题的帖子:
radio javascript






2007-12-21 09:58
