View Source
Go Back to /jang/books/asp/example/timeDisplay03.asp
<%@language=jscript%>
<%title="使用函數定義檔案來顯示現在時間"%>
<!--#include file="head.inc"-->
<hr>
<p>timeFunction.js run at client:<br>
<SCRIPT src="timeFunction.js"></SCRIPT>
<SCRIPT>
document.write('現在是「' + currentTime()+ '」!<br>');
document.write('今天是「' + currentDay() + '」!<br>');
</SCRIPT>
<p>timeFunction.js run at server:<br>
<SCRIPT language=jscript runat=server src="timeFunction.js"></SCRIPT>
<%
Response.write('現在是「' + currentTime()+ '」!<br>');
Response.write('今天是「' + currentDay() + '」!<br>');
%>
<hr>
<!--#include file="foot.inc"-->