<div class="htmlarea"> <textarea id="runcode83477"> <title> New Document </title> <script language="JavaScript"> function addTktTypeRow(){ var tbl = document.getElementById('tktTypeGrpTable'); var rowsLen = tbl.rows.length var tr=tbl.insertRow(rowsLen); var cs = new Array(); var forSize = 2; for(var i=0;i < forSize; i++){ cs[i] = tr.insertCell(); } var i=0; cs[i++].innerHTML ='<select onchange="parentNode.nextSibling.lastChild.value=options[selectedIndex].text"><option>清选择<option value="BBC">A<option value="DHL">B<option value="FBI">C<select>'; cs[i++].innerHTML ='<input type="text" name="tktTypeDesc" readOnly="true">'; } </script> <input type="button" name="button" onclick="addTktTypeRow()" value="add"> <table id="tktTypeGrpTable" width="100%" cellpadding="0" cellspacing="3"> <thead> <tr bgcolor="#FFFFFF"> <td class="tableHeader">Code</td> <td class="tableHeader">Description</td> </tr> </thead> </table> </textarea><br><input onclick="runEx('runcode83477')" type="button" value="运行代码"> <input onclick="doCopy('runcode83477')" type="button" value="复制代码"> <input onclick="doSave(runcode83477)" type="button" value="保存代码">[Ctrl+A 全选 注:<a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">如需引入外部Js需刷新才能执行</a>]</div> <br><div class="htmlarea"> <textarea id="runcode75191"> <title> New Document </title> <script language="JavaScript"> function addTktTypeRow(){ var tbl = document.getElementById('tktTypeGrpTable'); var rowsLen = tbl.rows.length var tr=tbl.insertRow(rowsLen); var cs = new Array(); var forSize = 2; for(var i=0;i < forSize; i++){ cs[i] = tr.insertCell(); } var i=0; cs[i++].innerHTML ='<select onchange="parentNode.nextSibling.lastChild.value=options[selectedIndex].getAttribute(\'aaa\')"><option>清选择<option aaa="BBC">A<option aaa="DHL">B<option aaa="FBI">C<select>'; cs[i++].innerHTML ='<input type="text" name="tktTypeDesc" readOnly="true">'; } </script> <input type="button" name="button" onclick="addTktTypeRow()" value="add"> <table id="tktTypeGrpTable" width="100%" cellpadding="0" cellspacing="3"> <thead> <tr bgcolor="#FFFFFF"> <td class="tableHeader">Code</td> <td class="tableHeader">Description</td> </tr> </thead> </table> </textarea><br><input onclick="runEx('runcode75191')" type="button" value="运行代码"> <input onclick="doCopy('runcode75191')" type="button" value="复制代码"> <input onclick="doSave(runcode75191)" type="button" value="保存代码">[Ctrl+A 全选 注:<a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">如需引入外部Js需刷新才能执行</a>]</div>