<thead id="toltr"></thead>
<progress id="toltr"><strike id="toltr"></strike></progress>

  • <ul id="toltr"><meter id="toltr"></meter></ul>
    <b id="toltr"></b>

    <strike id="toltr"></strike>

    <b id="toltr"></b>

  • 歡迎進(jìn)入紅數(shù)信息技術(shù)有限公司官網(wǎng)
    4008088160
    現(xiàn)在的位置:首頁(yè) > 發(fā)布營(yíng)銷型網(wǎng)站建設(shè) > 新聞資訊 > 判斷兩個(gè)文本框中只輸一個(gè)
    判斷兩個(gè)文本框中只輸一個(gè)
    信息來(lái)源:優(yōu)度網(wǎng)絡(luò)  發(fā)布日期:2009/5/18 瀏覽數(shù)量:1365
    文章導(dǎo)讀:

    判斷兩個(gè)文本框中只輸一個(gè)的實(shí)例:

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head>
    <title>標(biāo)題頁(yè)</title>
    <SCRIPT LANGUAGE="JavaScript">
    function checkFields()
    {
        name = document.submitform.name.value;   //獲取姓名
        email = document.submitform.email.value; //獲取郵箱
        if ((name == "") && (email == "") ) {    //如果兩者都為空
          alert("請(qǐng)輸入姓名和郵箱!");          
          return false;
        }
       else
          return true;
    }
    </script>
    </head>
    <body>
    <form  name=submitform onSubmit="return checkFields()">
        名字和郵箱只需要輸入一個(gè)即可<br>
        <br>
    <table border=0>
    <tr>
    <td align=center>名字</td><td> </td>
    <td align=center>Email</td></tr><tr>
    <td align=center><input type=text name=name value="" onFocus="document.submitform.email.value='';" size=10></td>
    <td align=center>或</td>
    <td align=center><input type=text name=email value="" onFocus="document.submitform.name.value='';" size=10></td>
    </tr>
    <tr>
    <td colspan=3 align=center><input type=submit value="提交"></td>
    </tr>
    </table>
    </form>
    </body>
    </html>

    相關(guān)信息
    • 網(wǎng)絡(luò)營(yíng)銷培訓(xùn)
    • 微網(wǎng)站
    • 掃二維碼
    • 1
    • 2
    • 3
    • 最新上傳
    • 精品案例
    18973218026
    其他業(yè)務(wù)合作請(qǐng)發(fā)下面郵箱
    郵箱:254596208@qq.com
    地址:湖南省湘潭市岳塘區(qū)霞光東路58號(hào)(維也納酒店6樓)
    營(yíng)銷型網(wǎng)站建設(shè)掃一掃關(guān)注官方微信

    關(guān)注優(yōu)度

    官方微信
    官方微博
    官網(wǎng)首頁(yè)
    亚洲日本中文字幕天天跟新,无码综合黄色在线,亚洲人成网站在线观看无码,久久久久亚洲无码
    <thead id="toltr"></thead>
    <progress id="toltr"><strike id="toltr"></strike></progress>

  • <ul id="toltr"><meter id="toltr"></meter></ul>
    <b id="toltr"></b>

    <strike id="toltr"></strike>

    <b id="toltr"></b>