ASP有关问题

来源:百度知道 编辑:UC知道 时间:2024/06/08 10:13:42
在ASP中
用<SCRIPT ...></SCRIPT>
写代码和<% %>写代码有什么区别?

有区别

<SCRIPT ...></SCRIPT> 是运行客户端脚本的,比如:
<SCRIPT type="javascript">alert("hello");</SCRIPT>
<SCRIPT type="vbscript">MsgBox "hello"</SCRIPT>

<% %> 是运行服务器端代码的,比如:

<%
Response.Write "hello"
%>