现在有个页面用了ajax 提交到一个php文档。以前有什么错误 php文档直接输出错误相关的内容。现在有了ajax什么都在当页显示。怎么能测试呢?
解决方案 »
- php或者mysql求一算法?
- php + pgsql 处理访问海量数据问题
- 安装dede出现Deprecated: Function ereg_replace() is deprecated in F:\wamp\www1\dede\c
- 请教一下提交按钮的问题
- 如果保存textarea里的图片
- Zend10.1.0中文乱码问题?
- if(!ereg("^[1-9][0-9]{14,17}$",$txt_iCardId))这句话怎末理解?
- ftp_connect的问题:主机地址使用ip可以连接,用域名就连不了?!!!
- MiMe类型有几种怎样写?
- 帮忙看PHP函数。
- 哪位大哥知道phpcms v9的伪静态规则设制吗?
- php下载文件到本地指定的目录,不提示下载框
至于怎么调试。一般都是自己伪造请求数据模拟请求过程.
if(isset($_GET['pot'])){
echo "端口正常";
}
var xmlHttp; function createXMLHttpRequest() {
if(window.XMLHttpRequest) {
xmlHttp = new XMLHttpRequest();
} else if (window.ActiveXObject) {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
}
function routeList(){
createXMLHttpRequest();
var port = document.condsys.netport;
for(var i=0; i<port.options.length; i++){
if (port.options[i].selected == true){
var pot = port.options[i].text;
} //end if
}
url = "manage_action_class.php?pot="+pot+"&ran="+Math.random();
method = "GET";
xmlHttp.open(method,url,true);
xmlHttp.onreadystatechange = showList;
xmlHttp.send(null);
} function showList(){
if (xmlHttp.readyState == 1){
document.getElementById("route").innerHTML="响应中……";
}else{
document.getElementById("route").innerHTML="";
}
if (xmlHttp.readyState == 4){
if (xmlHttp.status == 200){
var text = xmlHttp.responseText;
//在此将获取到的后台信息打印出来,如果是你想要的信息再将其屏蔽
alert("text-->>"+text);
return;
document.getElementById("route").innerHTML = text;
}else {
alert("response error code:"+xmlHttp.status);
}
}
}
<div id="route"></div>
错误也会出来的~~