首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 服务器 > 应用服务器 >

jsp代码有关问题

2012-02-25 
jsp代码问题请问一下在一个JSP页面中有如下代码段:%......//jsp代码%html.........!--html代码--//j

jsp代码问题
请问一下在一个JSP页面中有如下代码段:
   
<%
          ......
      //jsp代码
%>

<html>

            .........
            <!--html代码-->
            //jsp代码
</html>

<script>
        ......
        <!--js代码-->
</script>

当程序执行到这个页面时先执行哪种代码?

[解决办法]
这个问题太简单了
[解决办法]
当然先执行JSP代码了啊,这个只是我的理解哈,不知道是否正确
[解决办法]
按先后执行啊,你在每一块都加个提示不就知道了吗?
类似:
<%
if (1==1){
%>
<script>
alert('jsp');
</script>
<%}
%>
<html>
 <body>
<script>
alert('html');
</script>
<%
if (1==1){
%>
<script>
alert('html--jsp');
</script>
<%}
%>
 </body>
</html>
<script>
alert('script');
</script>

热点排行