0

我只真正了解 Lua 和 HTML。但我正在尝试扩展到 Javascript。

如何在此末尾添加串联?ID 始终是一个数字。

如何在 lua 中完成(如果这有帮助,请说明我的观点)“http://www.roblox.com/My/PrivateMessage.aspx?RecipientID="..X

4

4 回答 4

3
var myVar = 7;
var myString = "http://www.roblox.com/My/PrivateMessage.aspx?RecipientID=" + myVar;
于 2011-03-29T19:42:18.377 回答
1

javascript中的字符串连接可以使用运算符+来完成。例子:

var s1 = "hello";
var s2 = "world";
var s3 = s1 + " " + s2; // hello world 
于 2011-03-29T19:43:15.837 回答
1
"http://www.roblox.com/My/PrivateMessage.aspx?RecipientID="+myID
于 2011-03-29T19:43:19.197 回答
0
var s = "Hello";
s += "World";

document.write(s); // Prints HelloWorld
于 2011-04-12T13:22:04.390 回答