zoukankan      html  css  js  c++  java
  • JS根据TYPE设置页面所有radio的选择值 获取自定义属性

    //一键正常
            function benSetState() {
                $(function () {
                    $('input[type=radio]').each(function () {
                        if ($(this).val() == "1") {
                            $(this).attr('checked','true');
                        }
                    })
                })
            }


    <td align="center"><input type="radio" checked="checked"  name="rdState1" value="1" />正常 <input type="radio"  name="rdState2" value="2" />损毁 </td>
     //根据type获取控件所有hidden
     function fGetControlByType() {
         $('input[cuvaluetrantype=ewebedittype]').each(function () {
             var valueValue = $(this).attr('cuvaluetrantype'); //获取自定义属性
             var ewebeditID = $(this).attr('id').substring(3, $(this).attr('id').length); //截取组合ID字段
             var eWebditor1 = window.frames("eWebEditor" + ewebeditID).window.frames('eWebEditor').document.getElementsByTagName('body')[0].innerHTML; //获取ewebeditor值
             $(this).val(eWebditor1);//给隐藏控件赋值
         })
     }
  • 相关阅读:
    机器学习介绍
    Day03 作业
    Python函数基础
    Python练习
    耳机 线控 控制播放
    edittext 底线颜色
    从service启动activity startActivity慢 的解决方案
    国产手机没有google services 和google play崩溃,判断google services是否存在
    检测耳机插入和拔出
    获取view宽高
  • 原文地址:https://www.cnblogs.com/zecVip/p/4515438.html
Copyright © 2011-2022 走看看