<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    JAVA

    人生若只如初見,何事秋風悲畫扇。

      BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      50 隨筆 :: 25 文章 :: 157 評論 :: 0 Trackbacks
    以下是本人在代碼中常用到的一些JS腳本,雖然是一些簡單而又短小的function卻是幫了我不少的忙呢!希望對大家有些用,有了好的再貼上來 ^_^
    1:在一帶到復雜的FRAME頁面中OPEN一個窗體來(當然不用什么parent.parent啦)
    function ?checkuser(name)
    ????
    {
    ????????window.open(
    " about:blank " , " zhutong " ,?'menubar = 0 ,width = 350 ,height = 240 ,left = 230 ,top = 200 ,resizable = 0 ,scrollbars = auto');
    ????????window.document.forms['form1'].target?
    = ? " zhutong " ;
    ????????window.document.forms['form1'].action?
    = ? " Account/check.jsp?username= " + name;
    ????????window.document.forms['form1'].submit();????????
    ????}

    以下的LINK來觸發
    <a?href="javascript:checkuser(window.document.forms['SignUpForm'].name.value);">
    ????????????????????????????????????????
    <bean:message?key="account.signup.input.name.check"?/>
    ????????????????????????????????????
    </a>

    當然下面的不能少啦!
    </html:form>
    <form?name="form1"?method="post"?action="">
    </form>

    2:關閉一當前窗口,并且無關閉提示(這個功能太常用了)
    <input?type="submit"?name="Submit"?value="知道啦"?onClick='window.opener?=?"xxx";
    ????window.close();'
    >


    3:讓一個鏈接自動提交:
    如有一個鏈接:

    <a?href="xx.htm"?name="multiuse">AAA</a>


    則可以:

    var?urlfir?=?studyezurl?+?'/Authentication.do?actionid=ForgetPassword';
    var?urlsec?=?studyezurl?+?'/tempURL.do';
    multiuse.href?
    =?urlsec;
    multiuse.focus();
    multiuse.click();
    multiuse.href?
    =?urlfir;??//這個好象不起作用,所以最好將此urlfir設成在href中的默認值


    在STRUTS中有一個多個FRAME構成的系統.點擊注銷后想固定到某一頁面!(這個鬼費了我不少時間 ^_^ )


    4:讓HTML也有JSP中的request.getParameter("");
    HTML也可以通過JS來到得參數,函數如下(我將它保存到了一個數組里面):

    //--------------------------------------------------------------------------
    //
    Name:?GetArgsFromHref
    //
    //
    Pupers:?the?function?will?get?the?parameters?from?the?server
    //
    //
    Parameter:
    //
    sHref---->>the?current?URL
    //
    sArgName---->>the?Array?store?the?name?of?parameters?which?you?want?to?get
    //
    //
    Return:?Array?to?store?the?result
    //
    //
    Author:?Jkallen
    //
    ----------------------------------------------------------------------------
    function?GetArgsFromHref(sHref,?sArgName)
    {
    ????
    var?args??=?sHref.split("?");
    ????
    var?p_Result?=?new?Array();
    ????
    ????
    if(args[0]?==?sHref)?
    ????
    {
    ?????????
    return?p_Result;?
    ????}
    ??
    ????
    var?str?=?args[1];
    ????args?
    =?str.split("&");
    ????
    for(var?i?=?0;?i?<?args.length;?i?++)
    ????
    {
    ????????str?
    =?args[i];
    ????????
    var?arg?=?str.split("=");
    ????????
    if(arg.length?<=?1)?
    ????????????
    continue;
    ????????
    if(sArgName?!=?null)
    ????????
    {
    ????????????
    for(var?c1?=?0;?c1?<?sArgName.length;?c1++)
    ????????????
    {
    ????????????????
    var?tempValue?=?arg[0];
    ????????????????
    if(?tempValue?==?sArgName[c1])
    ????????????????????p_Result[tempValue]?
    =?arg[1];
    ????????????}
    ???
    ????????}
    //end?if
    ?????}
    //end?for
    ?????
    ?????
    return?p_Result;
    ?}
    //end?GetArgsFromHref


    所以你以后就可以通過如:

    var?curCourseID?=?pValue[c_courseID];


    的樣子來直接取了啦,c_courseID是參數名稱哦

    5:在頁面動態顯示當前時間

    <span?id="aa">當前時間</span><script>setInterval("aa.innerHTML=new?Date().toLocaleString()+'?星期'+'日一二三四五六'.charAt(new?Date().getDay());",1000);
    </script>?

    1000就表示了,每隔1000毫秒就更新一次aa里面的內容.

    6:對WEB頁面對象的常用操作,
    .select()? 選中對象(文本框)的內容
    .focus()?? 讓某個對象獲取焦點
    checked? 檢查單選按鈕是否處于選中狀態
    若存的是一組單選按鈕,根據document的一些方法:

    getElementById???? 獲取對 ID 標簽屬性為指定值的第一個對象的引用。
    getElementsByName???? 根據 NAME 標簽屬性的值獲取對象的集合。
    getElementsByTagName???? 獲取基于指定元素名稱的對象集合。
    可以用getElementsByName來解決,它是取得一些同名對象的集合,與getElementById(指定值的第一個對象的引用)不同.如下所示:

    var?tmppara?=?document.getElementsByName("para"+i);
    ???
    var?j=0;
    ???
    for(;j<tmppara.length;j++){
    ????
    if(tmppara[j].checked){
    ??????values[cur_index]?
    =?tmppara[j].value;
    ??????cur_index
    ++;
    ?????}

    ???}

    7:確定下拉框的值:

    <script?language="javascript">
    function?test(){
    ?
    var?se?=?document.form1.select;
    ?
    for(i=0;i<se.length;i++){
    ??
    if(se.options[i].value?==?55){
    ???se.options[i].selected
    =true;
    ???
    break;
    ??}
    ????
    ?}

    ?
    }

    </script>

    HTML 如下:

    <form?id="form1"?name="form1"?method="post"?action="">
    ????
    <select?name="select">
    ????
    <option?value="11"?selected="">11</option>
    ????
    <option?value="22">22</option>
    ????
    <option?value="33">33</option>
    ????
    <option?value="44">44</option>
    ????
    <option?value="55">55</option>
    ??
    </select>
    </form>

    刪除其中的一個option:
    se.options.remove(1);
    其中參數1表示下標

    8:使得某一對象不可用(可用剛改成false)
    document.form1.submit2.disabled=true;
    使得某一對象不可見(可見則改成visible)
    document.form1.submit2.style.visibility="hidden";

    9:日期以'yyyy-mm-dd'(2006-09-07 or 2006-9-17)

    function?chkdate(value)
    {
    ????
    var?datestr;
    ????datestr
    =value;
    ????
    var?lthdatestr;
    ????
    if?(datestr?!=?"")
    ????????
    {lthdatestr=?datestr.length}?;
    ????
    else
    ????????
    {lthdatestr=0};????
    ????
    var?tmpy="";
    ????
    var?tmpm="";
    ????
    var?tmpd="";
    ????
    var?status;
    ????status
    =0;
    ????
    if?(?lthdatestr==?0)
    ????????
    {return?(false)};????????????
    ????
    for?(i=0;i<lthdatestr;i++)
    ????
    {????if?(datestr.charAt(i)==?'-')
    ????????
    {
    ????????????status
    ++;
    ????????}

    ????????
    if?(status>2)
    ????????
    {
    ????????????
    return?(false);
    ????????}

    ????????
    if?((status==0)?&&?(datestr.charAt(i)!='-'))
    ????????
    {
    ????????????tmpy
    =tmpy+datestr.charAt(i);
    ????????}

    ????????
    if?((status==1)?&&?(datestr.charAt(i)!='-'))
    ????????
    {
    ????????????tmpm
    =tmpm+datestr.charAt(i);
    ????????}

    ????????
    if?((status==2)?&&?(datestr.charAt(i)!='-'))
    ????????
    {
    ????????????tmpd
    =tmpd+datestr.charAt(i);
    ????????}


    ????}

    ????year
    =new?String?(tmpy);
    ????month
    =new?String?(tmpm);
    ????day
    =new?String?(tmpd);
    ????
    if?((tmpy.length!=4)?||?(tmpm.length>2?||?tmpm.length<1)?||?(tmpd.length!=2))
    ????
    {
    ????????
    return?(false);
    ????}

    ????
    if?(!((1<=month)?&&?(12>=month)?&&?(31>=day)?&&?(1<=day))?)
    ????
    {
    ????????
    return?(false);
    ????}

    ????
    if?(!((year?%?4)==0)?&&?(month==2)?&&?(day==29))
    ????
    {
    ????????
    return?(false);
    ????}

    ????
    if?((month<=7)?&&?((month?%?2)==0)?&&?(day>=31))
    ????
    {
    ????????
    return?(false);
    ????
    ????}

    ????
    if?((month>=8)?&&?((month?%?2)==1)?&&?(day>=31))
    ????
    {
    ????????
    return?(false);
    ????}

    ????
    if?((month==2)?&&?(day==30))
    ????
    {
    ????????
    return?(false);
    ????}

    ????
    return?(true);
    }

    再加一個比較函數,剛剛寫的

    /************************************************************
    ?*將yyyy-mm-dd的日期型數據換成數字型以比較大小?add?by?zhangyinxin
    ************************************************************
    *****/

    function?changDate2Num(date){
    ????
    var?tmp?=?date.split('-')?;
    ????
    var?result;
    ????
    if(tmp.length<=0){
    ????????alert('日期格式(yyyy
    -mm-dd)不正確!');
    ????}
    else{
    ????????result?
    =?tmp[0];
    ????????
    if(tmp[1].length<2)????tmp[1]?=?"0"+tmp[1];
    ????????result?
    +=?tmp[1];?
    ????????
    if(tmp[2].length<2)????tmp[2]?=?"0"+tmp[2];
    ????????result?
    +=?tmp[2];?
    ????}

    //????alert(result);
    ????return?tmp;
    }

    10:對一組單選按鈕的處理---是否選中or返回選中值

    function?getValueofCheckBoxSelected_this(dyfs)
    {
    ????
    var?controlarray?=?document.getElementsByName(dyfs);
    ????
    if(controlarray==null||controlarray.length==0)
    ????????
    return?false;
    ???????
    for?(var?i=0;?i<controlarray.length;?i++)
    ???????
    {
    ????????
    if(controlarray[i].checked)
    ????????????
    return?controlarray[i].value;????
    ????????????
    //如果要返回是否選中,這兒返回true啦,下面返回false????
    ????}
    ????
    ????
    return?null;
    }

    11,從A頁面打開一個頁面B,從B中輸入相關信息后再從B頁面把信息傳到A頁面處理:
    從A頁面打開B頁面的方法:

    function?addPersonInfo(){
    ??
    var?obj?=
    ??window;
    ??
    var?url?=?"<%=contextpath%>/jsp/addinfo.jsp"
    ;
    ??window.showModalDialog(url,obj,'dialogwidth
    =500px;?dialogheight=300px;status=no;?help=
    no');
    }

    主要是其中的obj參數起作用.然后在B頁面 中返回:

    .
    var?obj?=
    ?window.dialogArguments;
    ????obj.addRow(username,phone,email);
    ????window.close();

    注意這兒只取了主要部分:username,phone,emial均是在B頁面取得一些信息obj.addRow()中addRow是A頁面中定義的,如下:

    /******************************************************************
    @name?addRow---為******增加一行
    @parameters????null
    @retrun?null
    @author?zhangyinxin
    *****************************************************************
    */

    function?addRow(name,phone,email){
    ????do something......
    }


    12:得用JS在WEB頁面中動態增加行列:
    這里主要用到了innerHTML, cells,rows,appendChild等一些方法與屬性有了它們基本上就OK了,更多可以參考HTML的參考手冊,可以做到如在DW更改界面一樣,感覺很爽(比如更改對象的title ,id ,style, name)!

    dateTr?=?document.getElementById("tr_name");//它實際上是一列也就是<tr></tr>'tr_name'是我自定義
    ????NewTr?=?document.all.dyzmx.cloneNode(true);
    ????NewTr.style.display?
    =?"block";
    ????
    var?cur_lxr_xm?=?dateTr.parentNode.rows[1].cells[1].innerHTML;
    ????dateTr.parentNode.appendChild(NewTr.cloneNode(
    true));
    ????
    var?added_new_tr?=?dateTr.parentNode.lastChild;????
    ..

    主要用到了cloneNode方法,其它更多可以參考關于HTML的對象介紹,然后再通過appendChild來增加一行(在此是增加一行).當然也可以自己定義一些元素來初始化innerHTML,as :

    html?=?"?<INPUT?type=text?style=\"width:30px;\"?value="+k+"?name=\"rwbh\"?maxlength=3>";
    ????????start.getElementsByTagName(
    "tr")[k].firstChild.innerHTML?=?html;

    順便說一下關于刪除:

    var?child_len?=?dateTr.parentNode.rows.length-1;
    ????????
    for(c2=child_len;?c2>0;?c2--){
    ????????????
    var?rows?=?[];
    ????????????
    if(name=='lxr')
    ????????????????
    if(dateTr.parentNode.rows[c2].title=='lxr_data'){
    ????????????????????rows.push(dateTr.parentNode.rows[c2]);
    ????????????????????
    for(var?i=0;i<rows.length;i++){
    ????????????????????????rows[i].parentNode.removeChild(rows[i]);
    ????????????????????}

    }????????
    ????????????????}

    注意這種方法刪除時,一不小心不犯錯了.一方面for(c2=child_len; c2>0; c2--)應該是遞減的方式來遍歷(因為rows里面push的時候,與刪除的時候節點是反向的,當然假如取rows的時候反向取也OK的),另一方面?dateTr.parentNode.rows.length-1不可以直接放到for里面(因為?dateTr.parentNode.rows.length-1的長值每在for里面跑一次就變一次,當然是變小啦).

    所以也可以如下處理:

    /******************************************************************
    @name?delRow---為******刪除選項中行
    @parameters????null
    @retrun?null
    @author?zhangyinxin
    *****************************************************************
    */

    function?delRow(){
    ????
    var?checkboxs?=?document.getElementsByName("checkspecial");
    ????
    var?rows?=?[];
    ????
    for(var?i=0;i<checkboxs.length;i++){
    ????????
    if(checkboxs[i].checked?&&?checkboxs[i].parentNode.parentNode.title!='tmp'){
    ????????????rows.push(checkboxs[i].parentNode.parentNode);
    ????????}

    ????}

    ????
    for(var?i=0;i<rows.length;i++){
    ????????rows[i].parentNode.removeChild(rows[i]);
    ????}

    }

    我這兒用到了復選框,當然這并不影響刪除的效果實現,它不過是一種刪除條件罷了(比如title也是哦)

    13:第一次見到這樣的自定義函數:

    function?$()?{
    ??
    var?elements?=?new
    ?Array();

    ??
    for?(var?i?=?0;?i?<?arguments.length;?i++)?
    {
    ????
    var?element?=
    ?arguments[i];
    ????
    if?(typeof?element?==
    ?'string')
    ??????element?
    =
    ?document.getElementById(element);

    ????
    if?(arguments.length?==?1
    )
    ??????
    return
    ?element;

    ????elements.push(element);
    ??}


    ??
    return?elements;
    }



    應用如下:

    this.removeRow??=??function(_id){??
    ???????????????????????
    var??row??=??$(this.id??+??"_row_"+
    _id);??
    ???????????????????????
    if(!row)return
    ;??
    ???????????????????????row.parentNode.removeChild(row);??
    ???????????}
    ?

    感覺蠻不錯!(原來這些是protype.js中的東東呢,呵呵 這二天看了下prototype.js原來它是為ruby寫的框架,不過這個東東確實不錯哦!)

    14:javascript驗證表單時常用

    "^-[0-9]*[1-9][0-9]*$"  //負整數

    "^-?\d+$"    //整數

    "^\d+(\.\d+)?$"  //非負浮點數(正浮點數 + 0)

    "^(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*))$"  //正浮點數

    "^((-\d+(\.\d+)?)|(0+(\.0+)?))$"  //非正浮點數(負浮點數 + 0)

    "^(-(([0-9]+\.[0-9]*[1-9][0-9]*)|([0-9]*[1-9][0-9]*\.[0-9]+)|([0-9]*[1-9][0-9]*)))$"  //負浮點數

    "^(-?\d+)(\.\d+)?$"  //浮點數

    "^[A-Za-z]+$"  //由26個英文字母組成的字符串

    "^[A-Z]+$"  //由26個英文字母的大寫組成的字符串

    "^[a-z]+$"  //由26個英文字母的小寫組成的字符串

    "^[A-Za-z0-9]+$"  //由數字和26個英文字母組成的字符串

    "^\w+$"  //由數字、26個英文字母或者下劃線組成的字符串

    "^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$"    //email地址

    "^[a-zA-z]+://(\w+(-\w+)*)(\.(\w+(-\w+)*))*(\?\S*)?$"  //url


    呵呵 我一天添一些JS上來,可惜朋友們看不到,因為這"貼子"沉下去了.沒辦法,可是它們真的幫我不少忙,我自己的也常到這兒來取經....

    以后不用序號了,直接改用日期
    06.7.18:今天我用JS產生一個checkbox,別的都沒事,就是在設置默認讓它選中時花了些時間:
    以下是代碼:
    input = document.createElement("input");
    ???input.setAttribute("type","checkbox");
    ???//input.defaultChecked = true;---此語句可以直接在產生checkbox的時候讓它默認選中
    ???input.setAttribute("value","1");
    ?? $('kdydx').appendChild(input);
    ???$('kdydx').lastChild.setAttribute("checked","ckecked");//要想通過setAttribute來設置,剛必須在appendChild之后
    關于它的答案我在
    http://forum.java.sun.com/thread.jspa?threadID=628633&messageID=3606303找到的。

    //打印
    function send_dy(){
    ?var bdhtml=window.document.body.innerHTML;
    ?sprnstr="<!--startprint-->";
    ?eprnstr="<!--endprint-->";
    ?prnhtml=bdhtml.substring(bdhtml.indexOf(sprnstr)+17);
    ?prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));
    ?window.document.body.innerHTML=prnhtml;
    ?window.print();
    ?window.document.body.innerHTML=bdhtml;
    }

    /**
    ?調用IE的打印控件打印TABLE
    ?tb為要打印的TABLE的ID
    ?pSzize為一頁的行數
    **/

    function tablePrint(tb,pSize,title){
    ?var nw = window.open('','','top=50,left=100,resizable=yes,width=800,height=600,titlebar=yes,menubar=no,status=no,location=no,scrollbars=yes');
    ?nw.document.open("text/html","GB2312")
    ?nw.document.write("<style media=print>");
    ?nw.document.write(".Noprint{display:none;}");//不需要打印的樣式
    ?nw.document.write(".PageNext{page-break-after: always;}");//
    ?nw.document.write(".data_Table{border-color:#000000;border-width:1px;border-style:solid;}");
    ?nw.document.write("</style>");
    ?nw.document.write("<style>");
    ?nw.document.write(".Mb_Input_Button{height:20px;border-left:1px solid #DAE8F7; border-top:1px solid #DAE8F7; border-right:1px solid #A0C4EB;border-bottom:1px solid #A0C4EB;background-color:#E4EBF3;padding-left:5px;padding-right:5px;margin:4px 5px 2px 0px;}");
    ?nw.document.write(".noShow{display:none;}");//打印預覽時不需要顯示的樣式
    ?nw.document.write("</style>");
    ?nw.document.write("<HEAD><TITLE>&nbsp;</TITLE></HEAD>");
    ?nw.document.write("<body>");
    ?nw.document.write("<div align='right'>");
    ?nw.document.write("<input type=button value='打印' onclick='document.all.WebBrowser.ExecWB(6,1);' class='NOPRINT Mb_Input_Button'>&nbsp;");
    ??nw.document.write("<input type=button value='頁面設置' onclick='document.all.WebBrowser.ExecWB(8,1);' class='NOPRINT Mb_Input_Button'>&nbsp;");
    ??nw.document.write("<input type=button value='打印預覽' onclick='document.all.WebBrowser.ExecWB(7,1);' class='NOPRINT Mb_Input_Button'>&nbsp;");
    ?nw.document.write("</div>");
    ?nw.document.write("<OBJECT? id=WebBrowser? classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2? height=0? width=0 VIEWASTEXT></OBJECT>");
    ?nw.document.write("<div align='center' style='margin-top:5; margin-bottom:5'><b>"+title+"</b></div>");
    ?var obj=document.getElementById(tb);
    ?var trObj=obj.childNodes[0].childNodes;
    ?for(i=0;i<trObj.length;i++){
    ?? if((i!=0)&&(i%pSize==0)){
    ? ?trObj[i].className="PageNext";
    ? ?}
    ? }
    ?nw.document.write(document.getElementById(tb).outerHTML);
    ?nw.document.write("</body>");
    }

    /**
    ?調用IE的打印控件打印對象
    ?tb為要打印的TABLE的ID
    ?pSzize為一頁的行數
    **/
    function objPrint(tb,title){
    ?var nw = window.open('','','top=50,left=100,resizable=yes,width=800,height=600,titlebar=yes,menubar=no,status=no,location=no,scrollbars=yes');
    ?nw.document.open("text/html","GB2312")
    ?nw.document.write("<style media=print>");
    ?nw.document.write(".Noprint{display:none;}");//不需要打印的樣式
    ?nw.document.write(".PageNext{page-break-after: always;}");//
    ?nw.document.write(".data_Table{border-color:#000000;border-width:1px;border-style:solid;}");
    ?nw.document.write("</style>");
    ?nw.document.write("<style>");
    ?nw.document.write(".Mb_Input_Button{height:20px;border-left:1px solid #DAE8F7; border-top:1px solid #DAE8F7; border-right:1px solid #A0C4EB;border-bottom:1px solid #A0C4EB;background-color:#E4EBF3;padding-left:5px;padding-right:5px;margin:4px 5px 2px 0px;}");
    ?nw.document.write(".noShow{display:none;}");//打印預覽時不需要顯示的樣式
    ?nw.document.write("</style>");
    ?nw.document.write("<HEAD><TITLE>&nbsp;</TITLE></HEAD>");
    ?nw.document.write("<body>");
    ?nw.document.write("<div align='right'>");
    ?nw.document.write("<input type=button value='打印' onclick='document.all.WebBrowser.ExecWB(6,1);' class='NOPRINT Mb_Input_Button'>&nbsp;");
    ??nw.document.write("<input type=button value='頁面設置' onclick='document.all.WebBrowser.ExecWB(8,1);' class='NOPRINT Mb_Input_Button'>&nbsp;");
    ??nw.document.write("<input type=button value='打印預覽' onclick='document.all.WebBrowser.ExecWB(7,1);' class='NOPRINT Mb_Input_Button'>&nbsp;");
    ??nw.document.write("<input type=button value='關閉' onclick='document.all.window.close();' class='NOPRINT'>");
    ?nw.document.write("</div>");
    ?nw.document.write("<OBJECT? id=WebBrowser? classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2? height=0? width=0 VIEWASTEXT></OBJECT>");
    ?nw.document.write("<div align='center' style='margin-top:5; margin-bottom:5'><b>"+title+"</b></div>");
    ?nw.document.write(document.getElementById(tb).outerHTML);
    ?nw.document.write("</body>");
    }

    /**
    ?中文英文混合時字符串的長度計算
    ?一個漢字2個字節
    **/
    String.prototype.length2 = function() {
    ??? var cArr = this.match(/[^x00-xff]/ig);
    ??? return this.length + (cArr == null ? 0 : cArr.length);
    }
    ...?? ....

    posted on 2006-03-06 17:05 Jkallen 閱讀(3142) 評論(3)  編輯  收藏 所屬分類: AJAX

    評論

    # re: 妙用javascript 2006-03-06 21:27 劍事
    function checkuser(name)
    {
    window.open("about:blank","zhutong", 'menubar=0,width=350,height=240,left=230,top=200,resizable=0,scrollbars=auto');
    window.document.forms['form1'].target = "zhutong";
    window.document.forms['form1'].action = "Account/check.jsp?username="+name;
    window.document.forms['form1'].submit();
    }
    可以改成這樣
    function checkuser(name)
    {
    window.open("Account/check.jsp?username="+name,"zhutong", 'menubar=0,width=350,height=240,left=230,top=200,resizable=0,scrollbars=auto');

    }


    <a href="javascript:checkuser(window.document.forms['SignUpForm'].name.value);">
    <bean:message key="account.signup.input.name.check" />
    </a>
    這個可以改成這樣
    <a href="javascript:checkuser(SignUpForm.name.value);">
    <bean:message key="account.signup.input.name.check" />
    </a>
      回復  更多評論
      

    # re: 妙用javascript 2006-03-07 08:48 Jkallen
    謝謝
    有道理!  回復  更多評論
      

    # re: 妙用javascript 2006-06-29 10:53 nina
    很好 收藏  回復  更多評論
      

    主站蜘蛛池模板: 亚洲AV中文无码乱人伦在线视色| 国产羞羞的视频在线观看免费| 最近中文字幕免费mv视频7| 先锋影音资源片午夜在线观看视频免费播放| 在线免费视频你懂的| 久久精品国产亚洲av麻豆蜜芽 | 午夜免费啪视频在线观看| 免费看少妇高潮成人片| 亚洲国产无线乱码在线观看 | 最新亚洲成av人免费看| 亚洲中文字幕无码久久2017| 中文字幕日韩亚洲| 亚洲精品美女久久777777| 暖暖在线日本免费中文| 日本免费一区尤物| 婷婷亚洲天堂影院| 成年大片免费视频| 日韩精品视频免费在线观看| 亚洲国产精品专区在线观看| 亚洲真人日本在线| 国产aⅴ无码专区亚洲av| 亚洲AV伊人久久青青草原 | 久久精品无码专区免费东京热| 久久成人国产精品免费软件| 成人免费午夜在线观看| 国产免费拔擦拔擦8x| 18禁网站免费无遮挡无码中文| 国内精品乱码卡1卡2卡3免费 | 亚洲精品伦理熟女国产一区二区| 亚洲aⅴ无码专区在线观看春色| 亚洲va乱码一区二区三区| 亚洲熟妇AV一区二区三区宅男| 亚洲成电影在线观看青青| 亚洲国产精品热久久| 亚洲一区二区三区无码国产| 男人的天堂av亚洲一区2区| 国产精品免费久久久久影院| 日本中文字幕免费看| 亚洲精品精华液一区二区 | 亚洲人成7777影视在线观看| 亚洲sm另类一区二区三区|