易截截图软件、单文件、免安装、纯绿色、仅160KB

JavaScript获取选中项

<script type="text/javascript">
function show(){
var ListUtil=new Object();
var ListUtil.getSelectedIndexes=function (oListbox){
var arrIndexes=new Array;
for(var i=0;i <oListbox.length;i++){
  if(oListbox.options[i].selected){
  arrIndexes.push[i];
  }
  }
  return arrIndexes;
};
var oListbox=document.getElementById("selAge");
var arrIndexes=ListUtil.getSelectedIndexes(oListbox);
alert("There are"+arrIndexes.length+"option selected."+"The options have the indexes"+arrIndexes+".");
}
</script>
</head>

<body onload="show()">
<select name="selAge" id="selAge" size="3" multiple="multiple">
  <option value="1" >18-21 </option>
  <option value="2" selected="selected">22-25 </option>

  <option value="3" selected="selected">26-29 </option>
  <option value="4">30-35 </option>
  <option value="5">Over 35 </option>
</select>
</body>这段代码怎么报错missing:before statement和show
is not defined


相关问答:

asp中用javascript动态改变Image的src的路径问题

<form id="form1" runat="server">
  <div>
  <script type="text/javascript">
  function oo(a){
  document.getEleme ......

javaScript 悬停浮动层定位

如何实现当鼠标悬停控件上时,出现该控件的尾部显示对应的层,鼠标移动到该层上进行相应的操作,当鼠标移除时(不在控件上也不在层上)层隐藏,

http://topic.csdn.net/u/20090830/23/5e5ded07-7216-46c2-9712- ......

javascript 找不到错误

<script type="text/javascript">
    function IsValidate()
    {
        var flag=false;
        var cellPartN ......

javascript如何调用asp.net带参数的函数

后台:
  protected void form_ini2(string id)
  {
  //处理代码
  }
前台:
 <script language="javascript">
 function DbClickEvent(a ......

JavaScript问题!

<html>
<head>
<title></title>
</head>
<body>
<font color="#0000FF"><b>请在文本框1中输入文字:</b>
<form>
  <input ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号