如何在Virtuemart 1.x中的必填输入字段中以星号形式添加星星(例如红色)?
只需在您的PHP中添加<span style="color: #FF0000;">*</span>
,或使用JQuery通过在必填字段(例如class="required"
)上使用标识符来动态添加它,如下所示:
$('<span style="color: #FF0000;">*</span>').insertAfter('input.required');
@Ing's answer isn't really correct. It should probably be
$('<div style="color: #FF0000;">*</div>').insertAfter('[required]');
instead.
That's what worked for me at least.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.