i tried your code here in jsfiddle and works fine in both chrome and firefox.i couldn't replicate the error, but i think you can use placeholder
for your purpose and it works much more better than onclick
<input id="name" type="text" name="x_first_name" placeholder="name *"/>
may i know the problem is on which version of chrome and what is the problem exactly? it doesn't clear the text box or something else?