<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档 </title>
</head>
<script>
function ss(num){
document.getElementById("sss").options[num] = null;
document.getElementById("sss").selecteIndex = 0
}
</script>
<body>
<select id="sss">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<input id="ff" type="text">
<input value="ss" type="button" onClick="ss(document.getElementById('ff').value)">
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档 </title>
</head>
<script>
function ss(num){
document.getElementById("sss").options[num] = null;
document.getElementById("sss").selecteIndex = 0
}
</script>
<body>
<select id="sss">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
<input id="ff" type="text">
<input value="ss" type="button" onClick="ss(document.getElementById('ff').value)">
</body>
</html>
解决方案 »
- 请问我做了个淡出淡隐的弹出层 但是发现多点几次这个弹出层就会一直出现在页面上不消失了 怎么办 代码如下
- 如何在javascript里控制select.options的某项隐藏?
- 为什么mztreeview导航菜单中使用sql server数据库无显示?
- 一道js题,求高手指点
- 100分求教,请各位帮帮忙
- window.event.srcElement?
- "::","->"这两个符号有什么用途,意义
- 窗口如何处理?
- 怎么实现当鼠标离开黑色区域的时候黑色部分消失,这种效果啊?
- 小白求助一个判断位置是否在区域的代码问题!
- 100分求一个关于innerHTML的解决方案
- 判断是否安装Adobe Reader
而在添加时,IE仍然两种都支持,但是firefox则只支持select.options.add