網頁登陸架構代碼

來源:互聯網
上載者:User

標籤:

 1 <!DOCTYPE html> 2 <html> 3 <head> 4     <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> 5     <title>TBUSF System</title> 6     <script type="text/javascript" src="./html_api.js"></script> 7  8 </head> 9 10 <body style="background-color:gray;padding: 20px;">11 12 <!--頁面標題-->13 <h1 style="text-align:center;color:yellow">welcome to TBUSF System</h1><br />14 15 <!--使用者登陸-->16 <p1 style="color:black">使用者User Name:</p1><br />17 <input id="user_id" tyle="text-align:center" type="text" name="username"><br />18 <p1 style="color:black">Code:</p1><br />19 <input id="code_id" type="text" name="code">20 <br><br>21 22 <!--點擊進入下一個頁面-->23 <input style="font-size:15px;" type="button" onclick="jump_page(‘user_id‘,‘code_id‘)" value="next page->">24 25 </body>26 </html>
./html_api.js(點擊登陸所調用函數):
 1 function jump_page(id_x,id_y) 2 { 3     try  4     {     5         x=document.getElementById(id_x).value; 6          y=document.getElementById(id_y).value; 7         if (x == ‘劉洋‘ && y == ‘1992‘) 8             n =1; 9         else10             n = 3;11         switch (n)12         {13             case 1:14                 window.open(‘https://www.baidu.com‘);15                 break;16             case 2:17                 window.location.href=‘https://www.baidu.com‘;18                 break19             default:20                 alert("fail");    21         }22     }23     catch(err)24     {25         txt = err.message26         alert(txt);27     }28 }

 

網頁登陸架構代碼

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.