JS 问号运算符的问题

       oPageHref.href = "http://" + bTest?arrSections[i]:"none";

 

这句语句的运行顺序不是所想的:   "http://" + (bTest?arrSections[i]:"none");

相反地是:  ( "http://"+bTest)?arrSections[i]:"none";

 

造成我的困扰.

posted on 2009-01-22 00:50  norsd  阅读(221)  评论(0编辑  收藏  举报

导航