筆記一:Login.html

來源:互聯網
上載者:User

標籤:style   class   c   ext   http   a   

作為一個初學者,在學習PHP中遇到不少的問題,現在開始將我們學習的所有頁面進行剖解和疑問解答,首先是Login.html 這個頁面全部都是靜態HTML語言,所以沒有太多的講的,但是最重要的有一點,就是要注意將HTML頁面填寫的資料傳到loginCheck.php中進行資料的處理時,需要對form標籤進行認真的編寫:

<form name="f2" action="LoginCheck.php" method="post">

..

帳號:

<input type=”text” name=”name” value=””>

密碼:

<input type=”password” name=”pw” value=””>

..

<.form>

此處的3個標籤是一定不能少的,第一個是名字,要先對它進行命名,然後action就是將這個表單裡的資料提交給誰來處理,當然這裡是提交給LoginCheck.php去處理,第三個就是method,翻譯過來就是方法、方式,意思就是說將這個表單裡的資料通過什麼方式傳送到LoginCheck.php網頁裡面去。

因為是做PHP的疑問筆記,就不對HTML進行解釋了,這裡的input標籤中的type是指類型:包括button、checkbox、file、hidden、image、password、radio、reset、submit、text

這裡只用到text和password;name是指這個input的名字,value就是文字框中的值。

 

Login頁面的筆記就到這裡了。

 

實戰開發時完整的代碼:

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>login</title>
<meta charset="utf-8">
<link href="styles/login.css" rel="stylesheet" type="text/css">
</head>
<body>
<form name="f2" action="LoginCheck.php" method="post">
<div id="top">
<img id="logo" src="images/logo.jpg">
<span id="toptext"><a>設為首頁</a>|<a>加入收藏</a>|<a>關於我們</a>|<a>聯絡我們</a></span>
</div>

 

<div id="main">
<div id="pic">
<div id="loginBox">
<b class="alphaBg">這個層用來顯示背景</b>
<div class="loginItem">
<div class="title"><p>管理員入口</p></div>
<div class="content">
<div class="item">
登入名稱:<br>
<input type="text" name="uid" class="input">
</div>
<div class="item">
密碼:<br>
<input type="password" name="pwd" class="input">
</div>
<div class="item"><br>
<input type="image" src="images/btnLogin.png">
</div>
</div>
</div>
</div>
<div id="btnChange"></div>
</div>
</div>

 

<div id="bottom">
<a>關於我們</a>|<a>官方部落格</a>|<a>客戶服務</a>|<a>隱私政策</a>|<a>今時代公司著作權 ? 2014-2015<a>
</div>
</form>
</body>
</html>

 

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.