<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&qu ...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html body{font-size:14px; line-height:30px; }input{margin:1px; width:90px; font-size:12px; padding:0; }#node{ width:100px; font-size:24px; font-weight:bold; float: left; }</style><script type="text/javascript">function changeLink(){ document.getElementById("node").innerHTML="搜狐";}function all_input(){ var aInput=document.getElementsByTagName("input"); var sStr=""; for(var i=0;i<aInput.length;i++){ sStr+=aInput[i].value+"<br />"; } document.getElementById("s").innerHTML=sStr;} function s_input(){ var aInput=document.getElementsByName("season"); var sStr=""; for(var i=0;i<aInput.length;i++){ sStr+=aInput[i].value+"<br />"; } document.getElementById("s").innerHTML=sStr; }</script></head><body><div id="node">新浪</div><input name="b1" type="button" value="改变层内容" onclick="changeLink();" /><br /><br /><input name="season" type="text" value="春" /><input name="season" type="text" value="夏" /><input name="season" type="text" value="秋" /><input name="season" type="text" value="冬" /><br /><input name="b2" type="button" value="显示input内容" onclick="all_input()" /><input name="b3" type="button" value="显示season内容" onclick="s_input()" /><p id="s"></p></body></html>
海外公司注册、海外银行开户、跨境平台代入驻、VAT、EPR等知识和在线办理:https://www.xlkjsw.com
原标题:Document方法的使用
关键词:
*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们:
admin#shaoqun.com
(#换成@)。