标签:manage lan var 获取 rip file asc alert onload
纯htm页面必须采用AJAX了,
ASP页面:var manager=‘<%=session("manager")%>‘,
ASPX页面:var manager=‘<%=Session["manager"]%>‘,
例如:用session来判断客户是否登录,
ASP页面:方法(1)manager.asp
<%
if not session("manager") then %>
<script language=javascript>
alert("请先登录");
window.navigate("index.htm");
</script>
<% end if
%>
show.asp
<!--#include file="manager.asp"-->
方法(2)show.asp
<script language="javascript" type="text/javascript">
<!--
function window.onload()
{
var manager=‘<%=session("manager")%>‘;
if (manager!=‘true‘)
{
alert("请先登录");
window.navigate("index.htm");
}
}
-->
</script>
标签:manage lan var 获取 rip file asc alert onload
原文地址:http://www.cnblogs.com/tianciliangen/p/6412679.html