An error occurred when we have special characters
<input value="Search Today's Deals" onfocus="if(this.getValue() == 'Search Today's Deals'){this.setValue('')}" />
When I click this textbox it show issue:
Failed to proces开发者_如何学Goss FBML JavaScript. Exception = "Javascript parse error, unexpected: RCURLY"
Please help me a way solve it.
I think the single quotes within single quotes need escaping: try this code :
<input value="Search Today's Deals" onfocus="if(this.getValue() == 'Search Today\'s Deals'){this.setValue('')}" />
精彩评论