4
我想为所有输入设置为X
值和small
类的红色。为什么我们无法通过jquery获取对象值
但这段代码不起作用。
$('.small[value="X"]').css('border','1px solid #F00');
HTML
<input type="text" value="<?php echo trim($order['dns1']); ?>" class="wd-150 en small" /><br />
<input type="text" value="<?php echo trim($order['dns1']); ?>" class="wd-150 en small" /><br />
<input type="text" value="<?php echo trim($order['dns1']); ?>" class="wd-150 en small" /><br />
有什么提示?
你有类'smalltx'但'.small'改变。试试'$('。smalltx [value =“X”]')' – Narek 2013-04-11 07:41:10