我可以把php放在onfocus和onblur上吗?在下面的代码中,有没有我可以写的方法:Textarea onfocus,onblur和php
comment<?php echo $row['titol_post'] ?>
在现在有评论的地方?
<?php $result = mysql_query("SELECT * FROM blog WHERE id= 1") or die(mysql_error());
while($row = mysql_fetch_array($result)) { ?>
<Form id="comentari" method="POST" action="rebut.php">
<textarea name="text_comment" rows="2" cols="30"
onfocus="if (this.value=='Comment') this.value = '';"
onblur="if (this.value=='') this.value = 'Comment';">Comment</textarea>
<input type="submit" class="boto" name="comentari" value="enviar"/>
</Form>
<?php } ?>
不要滥用'价值'为'
@Quentin:最好的办法是什么? – Nrc
'' – Quentin