以下是引用片段: <script type="text/javascript"> //<![CDATA[ function fListFmEle(obj){ try{ w.close(); } catch(e){} w=open('', 'popup', 'width=500, height=500, left=200, top=100, scrollbars') w.document.write('<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'); for(var i=0; i<obj.length; i++){ w.document.write('obj name: ',obj[i].name.fontcolor('red'), '<br/>obj type: ',obj[i].type.fontcolor('red'), '<br/>obj.value: ', obj[i].value.fontcolor('blue'), '<p/>'); } w.document.onclick=function(){ w.close(); } w.focus(); } // shawl.qiu script //]]> </script> <a href="#" onclick="fListFmEle(document.fm);">list form elements</a><p/> <form name="fm" id="fm" method="post" action=""> <input name="textfield" type="text" value="tbx value" /><br /> <input type="radio" name="RadioGroup1" value="radio" />Radio<br /> <input type="radio" name="RadioGroup1" value="radio" />Radio<br /> <input name="cbx" type="checkbox" id="cbx" value="checkbox" /> <input name="cbx1" type="checkbox" id="cbx1" value="checkbox" /> <input name="cbx2" type="checkbox" id="cbx2" value="checkbox" /><br /> <select name="select"> <option value="v">opt</option> <option value="v1">opt1</option> </select><br /> <select name="sle1" size="2" multiple id="sle1"> <option value="v">sle</option> <option value="v1">sle1</option> </select><br /> <textarea name="textarea">txa value</textarea><br /> <input type="submit" value="Submit" /> <input type="reset" value="Reset" /> </form> |