Get border style with jQuery

后端 未结 4 885
一生所求
一生所求 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:33

    Check this out. it appears you have to set an explicit side: How to get border width in jQuery/javascript Not exactly the same, but the same principle should apply to you, as demonstrated here:

    alert($('div').css('border-top-style'));
    

    http://jsfiddle.net/s7YAN/54/

提交回复
热议问题