html中checkbox选中则value为yes,没选中为no
来源:互联网 发布:如何成功应聘淘宝客服 编辑:程序博客网 时间:2024/06/06 07:18
Sencha Touch/Extjs中用html制作表单
html中checkbox选中则value为yes,没选中为no
<input type="text" name="text1">
<input type="text" name="text2">
<input type="text" name="text3">
<input name="checkbox1" type="checkbox" value="no" class="duigou">
<input name="checkbox2" type="checkbox" value="no" class="duigou">
<input name="checkbox3" type="checkbox" value="no" class="duigou">
1.首先获取所有的input框
var viewPort=Ext.Viewport.down('#视图ID')
var inputFields=viewPort.innerElement.dom.querySelectAll('input');//找到该视图下所有的input框
2.找到checkbox,判断有没有选中,选中则改变值为yes
for(var i = 0; i < inputFields.length; i++)
{
if(inputFields[i]['type']=='checkbox' && inputFields[i].checked)//是checkbox并且被选中,则改变值为
yes
{
inputFields[i].value='yes';
}
.....
}
html中checkbox选中则value为yes,没选中为no
<input type="text" name="text1">
<input type="text" name="text2">
<input type="text" name="text3">
<input name="checkbox1" type="checkbox" value="no" class="duigou">
<input name="checkbox2" type="checkbox" value="no" class="duigou">
<input name="checkbox3" type="checkbox" value="no" class="duigou">
1.首先获取所有的input框
var viewPort=Ext.Viewport.down('#视图ID')
var inputFields=viewPort.innerElement.dom.querySelectAll('input');//找到该视图下所有的input框
2.找到checkbox,判断有没有选中,选中则改变值为yes
for(var i = 0; i < inputFields.length; i++)
{
if(inputFields[i]['type']=='checkbox' && inputFields[i].checked)//是checkbox并且被选中,则改变值为
yes
{
inputFields[i].value='yes';
}
.....
}
- html中checkbox选中则value为yes,没选中为no
- html中checkbox选中则value为yes,没选中为no
- Struts中如何设置CheckBox为选中状态
- checkbox 设置为选中和未选中状态
- JS设置checkbox 为选中和未选中状态
- jquery获取checkbox选中值为undefined
- Android设置checkbox为选中状态
- IOS中对于多个按钮,选中其中一个,其他按钮选中状态为NO
- html中radio、checkbox选中状态研究
- html中input(radio,checkbox)取消/选中
- js中checkbox长度为undefinde如何解决以及取checkbox有多少被选中
- HTML radio 或者 checkbox 获取状态为选中的元素的值
- c# winform 遍历TreeView控件(属性为checkbox时)中,所有被选中的节点
- Html 点击文字选中checkbox
- js限制checkbox选中个数以限制六个为例
- 复选框checkbox如何判定为被选中
- jquery value值为某个数变成选中(selected)
- jquery--设置value为xxx的值选中
- LA 3516 - Exploring Pyramids (记忆化搜索dp)
- is not in the sudoers file
- OnPaint OnDraw OnPrint 的区别以及invalidate的调用过程
- 利特尔法则
- Windows使用WxWidgets开发界面(c++)环境搭建
- html中checkbox选中则value为yes,没选中为no
- C语言结构体占用空间内存大小解析
- java 应用下载文件名乱码
- sql
- PostgreSQL学习手册(数据库管理)
- Win32通用控件
- Spring定时器的两种实现方式
- SQL数值四舍五入小数点后保留2位
- VIM中去除搜索高亮和修改高亮颜色