我以下的代碼在運行時會出現錯誤,不果將ALERT("yyo");去掉的話就不會出錯,不去就會出錯.[code=JScript]
function goUrl(id)
{
alert (id+" "+<%=page+0%>);
if (id == 'L')
alert("yyo"); #就是此句
window.location.href ("repPbi_1.asp?id="+<%=session("zongye")+0%>);
else
if (id == "F")
window.location.href ("repPbi_1.asp?id=1");
else
if (id== "P")
window.location.href ("repPbi_1.asp?id="+<%=page-1%>);
else
window.location.href ("repPbi_1.asp?id="+<%=page+1%>);
}
[code]
function goUrl(id)
{
alert (id+" "+ <%=page+0%>);
if (id == 'L'){
alert("yyo"); #就是此句
window.location.href ("repPbi_1.asp?id="+ <%=session("zongye")+0%>);
}else{
if (id == "F"){
window.location.href ("repPbi_1.asp?id=1");
}else if (id== "P"){
window.location.href ("repPbi_1.asp?id="+ <%=page-1%>);
}else{
window.location.href ("repPbi_1.asp?id="+ <%=page+1%>);
}
}
}
function goUrl(id)
{
alert (id+" "+ <%=page+0%>);
if (id == 'L'){
alert("yyo"); #就是此句
window.location.href ("repPbi_1.asp?id="+ <%=session("zongye")+0%>);
}else if (id == "F"){
window.location.href ("repPbi_1.asp?id=1");
}else if (id== "P"){
window.location.href ("repPbi_1.asp?id="+ <%=page-1%>);
}else{
window.location.href ("repPbi_1.asp?id="+ <%=page+1%>);
}
}