清枫语txt微盘:<%%>和script的区别是什么?

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/06 04:25:10

<% %>中的内容在服务器端运行
<script></script>标签如果没有runat=server属性那就是在客户端运行的

<% 代码 %>在服务器端运行

<script runat=server>
代码
</script>
在服务端运行

<script>
代码
</script>
在客户端运行

你是在网页中看到了<script>……</script>和<%……%>吧?
<script>标签内写的是javascript代码。
<%%>中可以是asp,jsp,……的代码。
其中的差别你看一下这些的基础。

真情_旋律 说的对