【发布时间】:2009-08-04 07:19:51
【问题描述】:
喂
我想在双引号内给出一个 javascript 变量,谁能帮帮我?
【问题讨论】:
-
你能详细说明一下吗?或许提供您认为的代码示例,我们可以更正吗?
标签: php javascript html
喂
我想在双引号内给出一个 javascript 变量,谁能帮帮我?
【问题讨论】:
标签: php javascript html
您是否尝试过在双引号前使用 \ 来转义字符?
var myVar="this is my text in \"double quotes\"";
【讨论】:
var myString = <?=json_encode('This is a "test".');?>;
【讨论】:
我认为你在谈论字符串连接。如果是这样,那就是:
a = "word";
b = "there should be another " + a + " in the middle of this string.";
【讨论】: