js比较字符串问题
我想通过事件判断用户权限
比如修改upda ,新增 inserts
当session等于upda 的时候 inserts时间就出现错误好象只能执行一个
function doUpdate(obj)
{
var upade;
if(upade==<%=Session("UserId")%>)
{
var starid=document.starnew.star;
if(starid.length>1)
{
for(var i=0;i<starid.length;i++)
if(starid[i].checked)
{
//window.open('修改信息是:'+ starid[i].value,'update','width=200,height=100,left=500,top=300');
//alert('修改信息是:'+ starid[i].value);
window.location.href='jlsee.asp?dd=2&id='+ starid[i].value+"&kkk="+ starid[i].value+'&obj='+obj;
}
}
else
{
window.location.href='jlsee.asp?dd=2&id='+ starid.value+"&kkk="+ starid.value+'&obj='+obj;
}
}
else
{
alert('你没有权限进行操作此信息!');
return false;
}
}
function doAdd()
{
var inserts;
if(inserts==<%=Session("UserId")%>)
{
window.document.location.href='jlinsert.asp';
}
else
{
alert('你没新增信息的权限!');
return false;
}
}