这个方式更好
这个方式更好
This commit is contained in:
@@ -86,12 +86,14 @@
|
||||
那么我们可以这样来验证
|
||||
|
||||
slice:=[]string{"apple","pear","banane"}
|
||||
|
||||
for _, v := range slice {
|
||||
if v == r.Form.Get("fruit") {
|
||||
|
||||
v := r.Form.Get("fruit")
|
||||
for item in slice {
|
||||
if item == v {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
|
||||
## 单选按钮
|
||||
|
||||
Reference in New Issue
Block a user