使用jQuery获取边框样式 [英] Get border style with jQuery

查看:108
本文介绍了使用jQuery获取边框样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用jQuery获取边框样式。以下是无效的

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

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

检查 http://jsfiddle.net/s7YAN/31/ p>

Check http://jsfiddle.net/s7YAN/31/

推荐答案

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.

这篇关于使用jQuery获取边框样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆