課程
/后端開(kāi)發(fā)
/PHP
/Duang~MySQLi擴(kuò)展庫(kù)來(lái)襲
為什么我寫(xiě)時(shí)候placeholder和required會(huì)出現(xiàn)警告未定義屬性值啊,下面的的input也有,但運(yùn)行有沒(méi)有錯(cuò)
2016-12-06
源自:Duang~MySQLi擴(kuò)展庫(kù)來(lái)襲 2-7
正在回答
placeholder和required是H5支持的
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head>?? ?<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />?? ?<title>Document</title></head><body>??? <h2>添加用戶</h2>??? <form action = "doAction.php?act = addUser" method = "post">??????? <table border = "1" cellpadding = "0" cellspacing = "0" width = "80%" bgcolor = "#ABCDEF">??????????? <tr>?? ??? ??? ??? ?<td>用戶名</td>?? ??? ??? ??? ?<td><input type="text" name="username" id=""? placeholder='請(qǐng)輸入合法用戶名' required='required'/></td>?? ??? ??? ?</tr>?? ??? ??? ?<tr>?? ??? ??? ??? ?<td>密碼</td>?? ??? ??? ??? ?<td><input type="password" name="password" id=""? placeholder='請(qǐng)輸入密碼' required='required'/></td>?? ??? ??? ?</tr>?? ??? ??? ?<tr>?? ??? ??? ??? ?<td>年齡</td>?? ??? ??? ??? ?<td><input type="number" name="age" id="" min='1' max='125' placeholder='請(qǐng)輸入合法年齡' required='required'/></td>?? ??? ??? ?</tr>?? ??? ??? ?<tr>?? ??? ??? ????? <td? colspan = '2'><input type = "submit" value = "添加用戶"/></td>?? ??? ??? ?</tr>??????? </table>??? </form></body></html>
舉報(bào)
本教程從面向?qū)ο蠛兔嫦蜻^(guò)程兩個(gè)方面為你開(kāi)啟MySQLi學(xué)習(xí)之旅
1 回答提示我未定義
1 回答請(qǐng)教未定義這要如何解決?
4 回答刪除操作的時(shí)候,邏輯處理頁(yè)面會(huì)報(bào)未定義的參數(shù)
4 回答使用phpstorm寫(xiě)SQL查詢語(yǔ)句警告提示
2 回答為什么要把validate方法定義成靜態(tài)的???
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2017-01-04
placeholder和required是H5支持的
2016-12-06
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
?? ?<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
?? ?<title>Document</title>
</head>
<body>
??? <h2>添加用戶</h2>
??? <form action = "doAction.php?act = addUser" method = "post">
??????? <table border = "1" cellpadding = "0" cellspacing = "0" width = "80%" bgcolor = "#ABCDEF">
??????????? <tr>
?? ??? ??? ??? ?<td>用戶名</td>
?? ??? ??? ??? ?<td><input type="text" name="username" id=""? placeholder='請(qǐng)輸入合法用戶名' required='required'/></td>
?? ??? ??? ?</tr>
?? ??? ??? ?<tr>
?? ??? ??? ??? ?<td>密碼</td>
?? ??? ??? ??? ?<td><input type="password" name="password" id=""? placeholder='請(qǐng)輸入密碼' required='required'/></td>
?? ??? ??? ?</tr>
?? ??? ??? ?<tr>
?? ??? ??? ??? ?<td>年齡</td>
?? ??? ??? ??? ?<td><input type="number" name="age" id="" min='1' max='125' placeholder='請(qǐng)輸入合法年齡' required='required'/></td>
?? ??? ??? ?</tr>
?? ??? ??? ?<tr>
?? ??? ??? ????? <td? colspan = '2'><input type = "submit" value = "添加用戶"/></td>
?? ??? ??? ?</tr>
??????? </table>
??? </form>
</body>
</html>