Get border style with jQuery

后端 未结 4 888
一生所求
一生所求 2021-01-22 01:38

How can i get border style with jQuery. The following is not working

$(\'#get\').click(function() {
    var x = $(\'div\').css(\'borderStyle\');
    alert(x)
})
         


        
4条回答
  •  盖世英雄少女心
    2021-01-22 02:18

    Apparently you must specify the side.

    Like that :

    var x = $('div').css("border-left-style");
    

    http://jsfiddle.net/s7YAN/45/

    I think it's because each side could have a different size, color and style.

提交回复
热议问题