Django:获取radio值
2019-01-05 本文已影响0人
慢半帧
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)