• jQuery Raion, Select, CheckBox selector function


    Radio

    jQuery("input[type=checkbox][name='fbCqscsf.cqzdycqk']").not("[value=1]").attr("checked","");var item = $('input[@name=items][@checked]').val();$("input[@type=radio]").attr("checked",'2');  $('input[@name=items]').get(1).checked = true;
    the_value = jQuery('#radio_form input:radio:checked').val();
    $("input[@name='rdio']:checked").val()
    $("#genera :not(option:first)").remove(); // Delete select except the first one than the other  option Item  

    Select

    jQuery("#wgpz option[value='$!wgpz']").attr("selected",true)
    
    $('#select_id')[0].selectedIndex = 1;var item = $("select[@name=items] option[@selected]").text();$("#sel").attr("value",'-sel3');

    not function

    the_value = jQuery('#radio_form input:radio:checked').val();
    selectionCondition.not($(this)).attr("checked","");

    IE browser version detection

    var isVesion = jQuery.browser.msie && (jQuery.browser.version == "6.0") && !jQuery.support.style;
     Delete the first line of the outer table in addition to all rows of the records  .
    jQuery("#ywmcjlList tr:not(:first)").remove();
    $("someTableSelector").find("tr:gt(0)").remove();

    jQuery to determine whether the hidden element

    $("#integration").is(":hidden")
    
    //jQuery Let Div Timing hidden
    var timer = setTimeout("$('#alertmsg').css('display','none')",3000);
    clearTimeout(timer);
    
     var dialogTop  = Dialogs.focusedWindow.dialog[0].style.top;
     var dialogLeft = Dialogs.focusedWindow.dialog[0].style.left;
     var top =  e.clientY - parseInt(dialogTop);
     var left = e.clientX - parseInt(dialogLeft);
    
     jQuery("#demo").css("top", top + "px").css("left", left + "px").fadeIn("fast");

    To find the back of each paragraph next to sibling

    // Filtering Radios group selected radio var pramotion = $( "input[type=radio][name='" +name+ "_" +id+ "']" ); var checked = pramotion.filter( "input:checked" ); checked.next( "label" ).show(); pramotion.not( "input:checked" ).next( "label" ).hide(); pramotion.not( "input:checked" ).show(); analogyRadio.next( "img" ).hide();

    counteract.siblings().next( "img" ).hide();
    // To obtain additional promotions  ( Platform, shops  ) With flowers-Radio box
    var filterRadio = counteractVolumeRadio.filter($( "input[name!='" +fashion+ "'][value='"+sequence+ "']" ));
    var genera = $( "#genera" );
    var jsonCategory = $!shopcategory;
    jQuery.each(jsonCategory, function (index,sole){
    genera.append("<option value=" +sole.typecode+ ">" +sole.typename+ "</option>" );
    })

    If the attribute name contains "-" so, you must use quotation marks:

    jQuery  Code  :
    $(this).is(':checked')//jQuery CSS  Style settings  $("p").css({ color: "#ff0011", background: "blue" });$("p").css({ "margin-left": "10px", "background-color": "blue" });
    $(this).css("border","2px dashed #000000");
    $("input[type=submit]").css({height:"30px","40px"});
    $("p").css({"background-color":"yellow","font-size":"200%"});
    $(this).css({
             function(index, value) {
              return parseFloat(value) * 1.2;
            },
            height: function(index, value) {
              return parseFloat(value) * 1.2;
            }
    });
    $('div:eq(0)').css({
        'font-size' : '2em',
        'color' : '#cc00ff'
    });
    
    $("p").css({
      "color":"white",
      "background-color":"#98bf21",
      "font-family":"Arial",
      "font-size":"20px",
      "padding":"5px"
    });
    
    var item = $( 'input[@name=items][@checked]' ).val();
    $( "input[@type=radio]" ).attr( "checked" , '2' );
    $( 'input[@name=items]' ).get(1).checked = true ;
    the_value = jQuery( '#radio_form input:radio:checked' ).val();
    $( "input[@name='rdio']:checked" ).val()
  • 相关阅读:
    不用第三个变量互换两变量的值的两种方法。
    struts2截取字符串
    js控制表格单双行颜色交替显示
    Shell字符串
    Shell数组:shell数组的定义、数组长度
    Shell注释
    Shell运算符:Shell算数运算符、关系运算符、布尔运算符、字符串运算符等
    Shell替换:Shell变量替换,命令替换,转义字符
    Shell特殊变量:Shell $0, $#, $*, $@, $?, $$和命令行参数
    Shell变量:Shell变量的定义、删除变量、只读变量、变量类型
  • 原文地址:https://www.cnblogs.com/wangyuelang0526/p/4909472.html
Copyright © 2020-2023  润新知