Padding or margin value in pixels as integer using jQuery 看完上面的答案后。其中一个用户已经开始使用这些
alert($("a").css("margin-top"));
现在我想做这些
alert($("#cool").css("margin-top")); ' #cool is my table id <table id="cool">
但它不起作用。如何通过指定标识来获取标记的css属性?
答案 0 :(得分:0)
好像你没有把你的代码放在pageLoad事件中:
$(function(){
alert($("#cool").css("margin-top"))
})
或者您忘了将jQuery.js集成到您的页面中。