html中checkbox选中则value为yes,没选中为no
来源:互联网 发布:与网络有关的词汇 编辑:程序博客网 时间:2024/05/21 06:29
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';
}
.....
}
http://blog.csdn.net/l863784757/article/details/15502069
0 0
- 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的值选中
- 使用JBoss情况下的报错及解决方法
- 3、Socket编程
- wxWidgets中wxDateTime与wxString的互操作
- SharePoint 2013 Content Deployment 报错 These columns don't currently have unique values
- 在安装office2003时,出现:系统管理员设置了系统策略,禁止进行此安装
- html中checkbox选中则value为yes,没选中为no
- uva--10026+贪心
- ORACLE 夸实例同步数据库
- UITableView滚动到顶部
- No resource found that matches the given name 'android:Widget.Material.ActionButton'.
- eclipse or myeclipse修改字体大小
- Android设置AlertDialog点击按钮对话框不关闭(转)
- Android中的“再按一次返回键退出程序”实现
- nyoj63小猴子下落(简单模拟)