Code1:
<%
empid=Server.URLEncode("你好")
%>
<a href="javascript:newURL('EqpHist.asp?empid=<%=Server.URLEncode(empid)%>')">a link</a>
Code2:
<%
empid=Server.URLEncode("你好")
%>
<a href="#" onclick="newURL('EqpHist.asp?empid=<%=Server.URLEncode(empid)%>')">a link</a>
In both case,newURL is a javascript function
function newURL(URL)
{
var change = document.MainForm.hidChange.value
if (change == "TRUE") {
response = window.confirm("<%=msg%>")
if (response == false)
return
}
window.location.href = URL
}
<%
empid=Server.URLEncode("你好")
%>
<a href="javascript:newURL('EqpHist.asp?empid=<%=Server.URLEncode(empid)%>')">a link</a>
Code2:
<%
empid=Server.URLEncode("你好")
%>
<a href="#" onclick="newURL('EqpHist.asp?empid=<%=Server.URLEncode(empid)%>')">a link</a>
In both case,newURL is a javascript function
function newURL(URL)
{
var change = document.MainForm.hidChange.value
if (change == "TRUE") {
response = window.confirm("<%=msg%>")
if (response == false)
return
}
window.location.href = URL
}