$(document).ready(function()
{
$('#comment textarea').click(function()
{
if (this.value == this.'Post a comment')
{
this.value = '';
}
});
$('#comment textarea').blur(function()
{
if (this.value == '')
{
this.value = this.'Post a comment';
}
});
});
我有這個腳本卡在一個PHP文件。但它不起作用。 textarea的默認值是發表評論。該腳本應該將textarea的值在點擊時更改爲null,然後在blur上將其更改回發佈評論。jquery爲什麼這不工作?
'THIS.VALUE == this.'Post一個comment'' ---這是什麼!? – zerkms 2011-04-24 06:03:13