我在我的jsp页面中编码时遇到问题:
<body>
<script>
var a = "${testtesttest }";
</script>
</body>
毫无疑问,“testtesttest”对象一定是找不到的,但是应该返回什么?在官方文档中,它说:
For example, when evaluating the expression ${product}, the container will look for product in the page, request, session, and application scopes and will return its value. If product is not found, null is returned.
http://docs.oracle.com/javaee/1.4/tutorial/doc/JSIntro7.html
我以为null会返回,但是,如果我愿意,我不会问问题..通过firebug,在下面的浏览器中编译后的代码:。
<body>
<script>
var a = "";
</script>
</body>
为什么不为空?结果到底是什么,我很困惑..