作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
但是对于 radio 来说这是如何完-6ren">
在文本输入上,如果表单提交给自身,这就是您“记住”用户输入的值的方式,例如图片上传工具需要这样做,因此用户不必在表单中输入所有内容上传图片后再次查看。
<input type="text" id="text" name="text" value="<?php echo @$_POST['text'];?>">
但是对于 radio 来说这是如何完成的呢?
我不想用 php 创建实际的 radio ,我更喜欢另一个解决方案。但最终我会选择最简单的! Javascript在这里也可以使用!
谢谢
最佳答案
<input type="radio" id="radio_button_1" name="radio_button" value="1"<?php if($_POST['radio_button'] == 1) { print ' checked="checked"'; } ?> />
<input type="radio" id="radio_button_2" name="radio_button" value="2"<?php if($_POST['radio_button'] == 2) { print ' checked="checked"'; } ?> />
关于php - 还记得在 php 页面上向 self 提交表单时的 "Radio"值吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2283591/
在不使用 ANT 的情况下,有没有办法让 Eclipse 在我每次发布 Android 应用程序(我使用导出向导)时不提示我输入 keystore 密码(两次!)? p.s.-我的开发 PC 位于 a
我是一名优秀的程序员,十分优秀!