为什么警报框不起作用?
dis.dis
答案 0 :(得分:1)
我猜这个函数返回一个字符串。试试这个:
alert("<%=player.getTempId()%>");
因为如果返回没有引号的字符串,您将获得要呈现此页面的页面:
alert(aString) //and then you'll get an error that aString is not defined.
通过添加“”,页面将呈现如下:
alert("aString") //and will work