html 动态显示元素文本

jquery easy ui:http://www.runoob.com/jeasyui/jeasyui-dd-shopping.html

<html>
<head>
<title>dynamic show</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> </head>
<body onload=highlight('haha')>
<script>
function highlight(obj){ var selected = document.getElementById("currency");
document.getElementById("spantest").innerHTML=selected.options[selected.selectedIndex].text; document.getElementById("ptest").style.fontSize="xx-large";
document.getElementById("ptest").style.color="red"; }
</script>
<tr id="trtest">
<td colspan=3 id="tdtest" name="tdtest" >
<select id="currency" name="currency" onchange="highlight('haha')">
<option id="op1" value="one">1</option>
<option id="op2" value="two">2</option>
</select>
<span id="spantest" style="color:red; font-size:xx-large"></span>
<!--p id="ptest">This is an example paragraph.</p-->
</td>
<tr>
</body>
</html>
上一篇:GRE红宝书5-6


下一篇:centos7 部署 汉化版 gitlab 10.0.2