`
services
  • 浏览: 78748 次
  • 性别: Icon_minigender_1
  • 来自: 青岛
社区版块
存档分类
最新评论

可以输入的下拉列表

Web 
阅读更多
<html>
<head>
<script type="text/javascript">
    function show()
{
var tab = document.getElementById("test") ;
      //表格行数
      var rows = tab.rows.length ;
      //表格列数
      var cells = tab.rows.item(0).cells.length ;
alert("行数"+rows+"列数"+cells);
}
</script>
</head>
<body>
<table id="test" border="1">
<tr>
    <td>&nbsp;</td><td>nbsp;</td>
</tr>
<tr>
    <td>&nbsp;</td><td>nbsp;</td>
</tr>
</table>
<input type="button" onclick="show();"/><br>
<div style="position:relative;"> 
<span style="margin-left:100px;width:18px;overflow:hidden;"> 
<select style="width:118px;margin-left:-100px" onchange="this.parentNode.nextSibling.value=this.value"> 
<option value="www.souzz.net"> souzz </option> 
<option value="www.eWebSoft.com"> eWebSoft </option> 
<option value="WEB开发者"> WEB开发者 </option> 
</select></span><input name="box" style="width:100px;position:absolute;left:0px;"> 
</div>
</body>
</html>
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics