由买买提看人间百态

topics

全部话题 - 话题: startmyapp
(共0页)
w*s
发帖数: 7227
1
来自主题: Programming版 - 很困惑的javascript string compare问题
app.get('/startMyApp', function(req, res)
{
console.log("- - - - -" + myAppStatusCache + "- - - - -");
if (myAppStatusCache == "status=2;")
{
console.log("hello 1 ......");
console.log(myAppStatusCache+"-----------");
} else {
console.log("hello 2 ......");
console.log(myAppStatusCache+"-----------");
}
res.sendfile('myAppStatus.html');
});
output:
- - - - -status=2;- - - - -
hello 2 ......
status=2;-----------
i'm so confused, why it's not... 阅读全帖
(共0页)