JS鼠标点击求助
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/...
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<input name="" type="radio" value="" />商品
<input name="" type="radio" value="" />金额
<div>元宝<input type="text" value="5个" />单位</div>
<p>当点击“金额”的时候 “元宝”换成“金额”;“单位”换成“元”;既下面样子</p>
<div>金额<input type="text" value="5个" />元</div>
</body>
</html>
图片 展开
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<input name="" type="radio" value="" />商品
<input name="" type="radio" value="" />金额
<div>元宝<input type="text" value="5个" />单位</div>
<p>当点击“金额”的时候 “元宝”换成“金额”;“单位”换成“元”;既下面样子</p>
<div>金额<input type="text" value="5个" />元</div>
</body>
</html>
图片 展开
2个回答
展开全部
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="javascript" type="text/javascript">
function s1(){
document.getElementById("tTitle").innerHTML="元宝";
document.getElementById("tUnit").innerHTML="单位";
}
function s2(){
document.getElementById("tTitle").innerHTML="金额";
document.getElementById("tUnit").innerHTML="元";
}
</script>
</head>
<body>
<input name="" type="radio" value="" onclick="s1()" />商品
<input name="" type="radio" value="" onclick="s2()" />金额
<div><span id="tTitle">元宝</span><input type="text" value="5个" /><span id="tUnit">单位</span></div>
<p>当点击“金额”的时候 “元宝”换成“金额”;“单位”换成“元”;既下面样子</p>
<!--<div>金额<input type="text" value="5个" />元</div>-->
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="javascript" type="text/javascript">
function s1(){
document.getElementById("tTitle").innerHTML="元宝";
document.getElementById("tUnit").innerHTML="单位";
}
function s2(){
document.getElementById("tTitle").innerHTML="金额";
document.getElementById("tUnit").innerHTML="元";
}
</script>
</head>
<body>
<input name="" type="radio" value="" onclick="s1()" />商品
<input name="" type="radio" value="" onclick="s2()" />金额
<div><span id="tTitle">元宝</span><input type="text" value="5个" /><span id="tUnit">单位</span></div>
<p>当点击“金额”的时候 “元宝”换成“金额”;“单位”换成“元”;既下面样子</p>
<!--<div>金额<input type="text" value="5个" />元</div>-->
</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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script>
function a(){
if(document.getElementById("r1").checked==true){
document.getElementById("a1").innerText="商品";
document.getElementById("a2").innerText="单位";
}else{
document.getElementById("a1").innerText="金额";
document.getElementById("a2").innerText="元";
}
}
</script>
</head>
<body>
<input id="r1" name="a" type="radio" value="0" checked onclick="a()"/>商品
<input id="r2" name="a" type="radio" value="1" onclick="a()"/>金额
<div><label id="a1">元宝</label><input type="text" value="5个" /><label id="a2">单位</label></div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script>
function a(){
if(document.getElementById("r1").checked==true){
document.getElementById("a1").innerText="商品";
document.getElementById("a2").innerText="单位";
}else{
document.getElementById("a1").innerText="金额";
document.getElementById("a2").innerText="元";
}
}
</script>
</head>
<body>
<input id="r1" name="a" type="radio" value="0" checked onclick="a()"/>商品
<input id="r2" name="a" type="radio" value="1" onclick="a()"/>金额
<div><label id="a1">元宝</label><input type="text" value="5个" /><label id="a2">单位</label></div>
</body>
</html>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询