-3

How can I insert quotes in a string, anchor tag? I am adding link using tag in my application of node.js. It is not accepting.

How to overcome that? And what is the reason it doesn't accept that?

"<A HREF="index.html">";
4

2 回答 2

1

您可以在字符串文字中转义引号:

var s = "<A HREF=\"index.html\">";
于 2013-07-04T12:30:28.710 回答
0

有两种方法

第一种方法

var s = '<A HREF="index.html">';

第二种方法

字符串文字中的转义引号:

var s = "<A HREF=\"index.html\">";

于 2013-07-04T12:31:53.310 回答