如何选择具有特定样式属性的?
<div style="width: 420px; text-align: left; margin-top: 10px; margin-bottom: 10px;">
我正在尝试:
$("div[style='width: 420px; text-align: left; margin-top: 10px; margin-bottom: 10px;']);
但是什么都没有被选中。
最佳答案
您的示例对我有用,至少在 Chrome 中,一旦我更正了行尾缺少的 "的拼写错误。
$("div[style='width: 420px; text-align: left; margin-top: 10px; margin-bottom: 10px;']");
关于javascript - jQuery:选择样式属性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4291605/