zoukankan      html  css  js  c++  java
  • 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()
  • 相关阅读:
    [C#]RichTextBox实现拖放
    [C#]WinForm动态删除控件 Controls.Remove()
    [C#]WinForm 中 comboBox控件之数据绑定
    [C#.Net]KeyDown(KeyUp)和KeyPress的区别
    [C#.NET]最简单的实现文本框的水印效果
    [C#.Net]对WinForm应用程序的App.config的使用及加密
    Spring MVC异常处理详解
    MAC与HMAC的介绍及其在AWS和Azure中的应用
    isDebugEnabled有什么用?
    在Mysql中Using filesort代表什么意思?
  • 原文地址:https://www.cnblogs.com/wangyuelang0526/p/4909472.html
Copyright © 2011-2022 走看看