$$的问题 [英] Problem with $$

查看:57
本文介绍了$$的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须像下面那样连接字符串.

I have to concate string like below.

var number = 100;
var tmp = "$$myText" + number + "$$";
alert(tmp);



但是,tmp包含空白值.

万一我写得像;



but, tmp contains BLANK value.

In case, I write like;

var number = 100;
var tmp = "myText" + number;
alert(tmp);



然后tmp包含"myText100".

我相信问题出在$$.

任何建议都会有所帮助...



then tmp contains "myText100".

I believe the problem is with $$.

Any suggestion will be helpful...

Thanks.

推荐答案

myText"+数字+"
myText" + number + "


; alert(tmp);
"; alert(tmp);



但是,tmp包含空白值.

万一我写得像;



but, tmp contains BLANK value.

In case, I write like;

var number = 100;
var tmp = "myText" + number;
alert(tmp);



然后tmp包含"myText100".

我相信问题出在



then tmp contains "myText100".

I believe the problem is with


.

任何建议都会有所帮助...

谢谢.
.

Any suggestion will be helpful...

Thanks.


这篇关于$$的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆