$(".box_yazi2").each(function () {
var default_value = this.value;
$(this).css('color', '#555'); // this could be in the style sheet instead
$(this).focus(function () {
if (this.value == default_value) {
this.value = '';
$(this).css('color', '#000');
}
});
$(this).blur(function () {
if (this.value == '') {
$(this).css('color', '#555');
this.value = default_value;
}
});
});
Эта функция значения по умолчанию ввода не работает в FF, но отлично работает в IE и, конечно, сам вход выглядит следующим образом:
<input type="text" class="box_yazi2" id="konu" name="konu" value="Boş" />