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