Get border style with jQuery

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

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

    http://jsfiddle.net/jbrooksuk/YJQAS/

    It seems that you're unable to get the whole border style in one go. You need to explicitly state which part of it you want.

提交回复
热议问题