php页面中,
原代码如下:
<div>
<input name="lp" type="checkbox" style="margin-bottom:-1px;" value="1"> a
</div>
<div>
<input name="esf" type="checkbox" style="margin-bottom:-1px;" value="1"> b
</div>
<div>
<input name="price[]" type="checkbox" style="margin-bottom:-1px;" value="1"> 1
<input name="price[]" type="checkbox" style="margin-bottom:-1px;" value="2"> 2
</div>刚进页面时,最后一排的条件是不可用的,复选框和文字都要为灰色,点击了上面的a和b中的任何一项后,这一排变为可用
这如何实现呀,thanks
原代码如下:
<div>
<input name="lp" type="checkbox" style="margin-bottom:-1px;" value="1"> a
</div>
<div>
<input name="esf" type="checkbox" style="margin-bottom:-1px;" value="1"> b
</div>
<div>
<input name="price[]" type="checkbox" style="margin-bottom:-1px;" value="1"> 1
<input name="price[]" type="checkbox" style="margin-bottom:-1px;" value="2"> 2
</div>刚进页面时,最后一排的条件是不可用的,复选框和文字都要为灰色,点击了上面的a和b中的任何一项后,这一排变为可用
这如何实现呀,thanks
解决方案 »
- ewebeditor存储超长字符串的郁闷问题。
- 一个异常奇怪的问题:一刷新就异常,重新上传一下模板正常了,再刷新又异常。
- 哪位大哥推荐一个PHP邮件类啊?
- 乱码
- 上传跟踪用PHP扩展好,还是Flash?????
- php正则表达式求救!!
- 为什么不能获取URL中的&后面的参数。
- 新手提问:在php怎样重定向另一个网址.
- php中如何全部显示出添加到数据库中的文字,好像只能显示1000字左右,高分求教?
- uploadify上传问题
- 关于自定义函数在哪里执行的问题
- foreach from=$default_products item=product name=myLoop 这个语句怎么理解?
<input name="lp" type="checkbox" style="margin-bottom:-1px;" value="1"> a
</div>
<div>
<input name="esf" type="checkbox" style="margin-bottom:-1px;" value="1"> b
</div>
<div>
<input name="price[]" type="checkbox" style="margin-bottom:-1px;" value="1" disabled> 1
<input name="price[]" type="checkbox" style="margin-bottom:-1px;" value="2" disabled> 2
</div>
根据你要的条件决定是不是要加disable属性
这样设置为何没有用呢,大家帮我看下
这个出来的是一个数组
要用document.getElementsByName("price")[0]
document.getElementsByName("price")[1]
document.getElementsByName("price[]")[1].disabled=false;你应该在循环里做这类设置var el = document.getElementsByName("price[]");
for(i=0; i<el.length; i++)
el[i].disabled = false;