為什么那個(gè)value="1"不能寫(xiě)成value="男"?
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>單選框、復(fù)選框</title>
</head>
<body>
<form action="save.php" method="post" >
? ? <label>性別:</label>
? ? <label>男</label>
? ? <input type="radio" value="1" ?name="gender" />
? ? <label>女</label>
? ? <input type="radio" value="2" ?name="gender" />
</form>
</body>
</html>
為什么那個(gè)value="1"不能寫(xiě)成value="男"?
2015-05-22
在實(shí)際開(kāi)發(fā)中,value中的內(nèi)容是要和后臺(tái)進(jìn)行交互的,一般不采用在value中寫(xiě)中文,可能會(huì)出現(xiàn)亂碼的情況。
在這節(jié)當(dāng)中,只是練習(xí)使用的,如果你的網(wǎng)頁(yè)是靜態(tài)頁(yè)面的話,你可以寫(xiě)成中文