$(document).ready(function(e){
$.ajax({
url:"test.php",
datatype:"post",
type:"text",
data:{name:"admin",pwd:"admin"},
success:function(msg){
if(msg == 'yes')
{
window.location = "home.php";
}
}
});
}以上是个简单的测试代码.功能暂且不论...有没有一种可能,通过欺骗,发送一条包含了"yes"的字符串,骗取该段代码跳转到"home.php"页面中?应该怎么避免这种情况的发生?至于"home.php"的处理,希望各位大神就不要说了.什么cookie和session之类的,放在一边吧.光页面跳转,就等于在消耗服务器有限的资源了. 最佳答案