开发者

Problem fbjs with special characters

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('')}" />
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜