-2
如何更改jquery提示文本顏色。目前它與textfield的顏色相同,但我希望它有所不同!如何更改jquery提示顏色
$(document).ready(function() {
//Shows the title in the text box, and removes it when modifying it
$('input[title]').each(function (i) {
$(this).val($(this).attr('title')).addClass('hint');
$(this).focus(function() {
if ($(this).val() == $(this).attr('title')) {
$(this).val('').removeClass('hint');
}
});
$(this).blur(function() {
if ($(this).val() == '') {
$(this).val($(this).attr('title')).addClass('hint');
}
});
});
//Clear input hints on form submit
$('form').submit(function() {
$('input.hint').val('');
return true;
});
});
如果你正在尋找的樣式標題屬性,你不能。 – j08691 2012-03-04 00:10:38