你好,我有这样的代码在我的jsp在我的jsp逃脱撇号
<a href="#"onclick="supprimerProduit('<bean:write name="gererProduitsForm" property="type_produit.nomProduit"/>','supprimerProduit','',<bean:write name="gererProduitsForm" property="type_produit.idProduit"/>)"></a>
所以我有一个JavaScript错误,当我有例如
在我的VAR托马的
<bean:write name="gererProduitsForm" property="type_produit.nomProduit"/>
我该如何逃避撇号? Thx
嗨,Mercer!是不是你的questin重复http://stackoverflow.com/q/1470768? – brandizzi 2011-04-27 13:36:02
也许但我该如何在我的jsp中使用这个http://commons.apache.org/lang/api-2.4/org/apache/commons/lang/StringEscapeUtils.html#escapeJavaScript%28java.lang.String%29? – Mercer 2011-04-27 13:38:42
[如何在JSP上使用撇号或引号(由javascript使用)](http://stackoverflow.com/questions/1470768/how-to-escape-apostrophe-or-quotes-on-a-jsp -used-by-javascript) – 2011-04-27 13:43:34