Django 获取radio值
html代码
<input type="radio" name="zl" value="1" checked="checked">百度
<input type="radio" name="zl" value="2">搜狗
django代码
zl = request.POST['zl']
zl = int(zl)
print("种类:", zl)
<input type="radio" name="zl" value="1" checked="checked">百度
<input type="radio" name="zl" value="2">搜狗
zl = request.POST['zl']
zl = int(zl)
print("种类:", zl)
本文标题:Django:获取radio值
本文链接:https://www.haomeiwen.com/subject/dwblrqtx.html
网友评论