在页面类中:
public partial class spjk : System.Web.UI.Page
{
public string yh;
public string yhjb;
protected void Page_Load(object sender, EventArgs e)
{
yh = Request.QueryString["yh"];
yhjb = Request.QueryString["yhjb"];
Session["yh"]=yh; //保存用户
}
}
JS中调用:
function zxqx() //执行权限判断
{
yhid='<%=yh%>'; //得到合法用户标识
yhjb='<%=yhjb%>'; //用户级别
}
///打开一个无工具栏和导航栏的页面
window.open("spjk.aspx?yh="+ yh+"&yhjb="+yhjb,"","width="+(screen.availWidth-8)+",height="+(screen.availheight-60)+",top=0,left=0,toolbar=0,location=0,directories=0,status=1,menubar=0,resizable=1,scrollbars=0");