課程
/后端開發
/PHP
/Duang~MySQLi擴展庫來襲
為什么我寫時候placeholder和required會出現警告未定義屬性值啊,下面的的input也有,但運行有沒有錯
2016-12-06
源自:Duang~MySQLi擴展庫來襲 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='請輸入合法用戶名' required='required'/></td>?? ??? ??? ?</tr>?? ??? ??? ?<tr>?? ??? ??? ??? ?<td>密碼</td>?? ??? ??? ??? ?<td><input type="password" name="password" id=""? placeholder='請輸入密碼' required='required'/></td>?? ??? ??? ?</tr>?? ??? ??? ?<tr>?? ??? ??? ??? ?<td>年齡</td>?? ??? ??? ??? ?<td><input type="number" name="age" id="" min='1' max='125' placeholder='請輸入合法年齡' required='required'/></td>?? ??? ??? ?</tr>?? ??? ??? ?<tr>?? ??? ??? ????? <td? colspan = '2'><input type = "submit" value = "添加用戶"/></td>?? ??? ??? ?</tr>??????? </table>??? </form></body></html>
舉報
本教程從面向對象和面向過程兩個方面為你開啟MySQLi學習之旅
1 回答提示我未定義
1 回答請教未定義這要如何解決?
4 回答刪除操作的時候,邏輯處理頁面會報未定義的參數
2 回答為什么要把validate方法定義成靜態的???
4 回答使用phpstorm寫SQL查詢語句警告提示
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網安備11010802030151號
購課補貼聯系客服咨詢優惠詳情
慕課網APP您的移動學習伙伴
掃描二維碼關注慕課網微信公眾號
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='請輸入合法用戶名' required='required'/></td>
?? ??? ??? ?</tr>
?? ??? ??? ?<tr>
?? ??? ??? ??? ?<td>密碼</td>
?? ??? ??? ??? ?<td><input type="password" name="password" id=""? placeholder='請輸入密碼' required='required'/></td>
?? ??? ??? ?</tr>
?? ??? ??? ?<tr>
?? ??? ??? ??? ?<td>年齡</td>
?? ??? ??? ??? ?<td><input type="number" name="age" id="" min='1' max='125' placeholder='請輸入合法年齡' required='required'/></td>
?? ??? ??? ?</tr>
?? ??? ??? ?<tr>
?? ??? ??? ????? <td? colspan = '2'><input type = "submit" value = "添加用戶"/></td>
?? ??? ??? ?</tr>
??????? </table>
??? </form>
</body>
</html>