博学,审问,慎思,明辨,笃行

The World Of wtiancai
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

一些常用的javascript

Posted on 2005-03-29 09:16  wtiancai  阅读(713)  评论(0编辑  收藏  举报
点击某个html控件促使跳转菜单提交
function MM_jumpMenu(targ,selObj,restore){
//v3.0
document.form2.submit();
}

function doPageIndex(obj){
document.form2.PageIndex.options[obj-1].selected=true; document.form2.PageIndex.onchange();
}

<a style="cursor:hand " onClick="doPageIndex(1)">First</a>
<select name="PageIndex" id="PageIndex" onChange="MM_jumpMenu('self',this,0)">
<%
       for (int j = 1;j <= totalPage;j++){
        String SelStatus = "";
        if (PageIndex == j){
                     SelStatus = "selected";
        }
        else{
         SelStatus = "";
        }
        out.println("<option value="+j+" "+SelStatus+">" + j + "</option>");
       }
       %>
</select>