解决方案 »
- thinkphp,TOKEN_ON关闭了还是有令牌
- 我想问一下,如果要做类似下面的网站,都需要用什么来做
- 【百度分享】MySQL 5.1分区技术初探(六)
- 兄弟们有没有用eclipse写php的,你们是有PHPEclipse还是PDT
- require文件时的路径问题?
- 正则表达式中对单词的处理问题:如要匹配[中国]?、^[中国],它会匹配成中或国,而不能匹配中国。有处理的办法吗?谢谢!
- ?!?!?!?!??!??!?**帮忙
- session的问题。
- PHP遍历问题,麻烦路过的问题
- 请会编程的帮忙修改下实现PHP代码读取http://www.testgod8.com/1.xml内容并显示
- php做保存进度,我的思路,谁可以写出来,我写了远行失败了。
- HTML中嵌入php出现问题
关键就是既不跳转,也不提示..我在想,,最大的可能是不是在 phpmailer类里面,抛出了异常什么的..影响了我原本的JS提示框的运作...
但是看不太懂...
var m = $("<div class=\"modal hide fade\"></div>");
var cnt = "";
return {'show':function(type,obj){
switch(type)
{
case 'ajax':
cnt = "<div class=\"modal-header\" style=\"height:2em;overflow:hidden;\"><button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">×</button><h5>出现错误</h5></div><div class=\"modal-body\"><p class=\"alert alert-error\">"+obj.message+"</p></div>";
break; case 'ajaxOK':
cnt = "<div class=\"modal-header\" style=\"height:2em;overflow:hidden;\"><button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">×</button><h5>操作成功</h5></div><div class=\"modal-body\"><p class=\"alert alert-success\">"+obj.message+"</p></div>";
break; default:
cnt = "<div class=\"modal-header\" style=\"height:2em;overflow:hidden;\"><button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">×</button><h5>出现错误</h5></div><div class=\"modal-body\"><p class=\"alert alert-error\">"+$(obj).attr('message')+"</p></div>";
}
m.html(cnt);
m.modal({"backdrop":false});
},
'hide':function(){
m.modal('hide');
}
};
})(),
'copyRight':'redrangon',
'removeUploadedImage': function(_this)
{
$(_this).parents('.thumbuper').remove();
}});JS代码.
alert(type); //加上这个,看看传入的是什么
switch(type)
感谢版主回复..我刚试了下.加了这句代码后...如果是错误..会提示 ajax ,如果成功..依然没有反应...说明有可能没有顺利调用到JS....
但是为什么呢?? 难道是phpmailer的影响?
不用我这个JS提示也行...但是我试过了 header() ,exit()各种提示方法...就是没一个有用....不知道什么原因..
你的是ajax形式,所以header()是不会有用的。可用debug方法:首先打开php的错误提示,然后用抓包工具(或者直接firefox firebug),看看响应或者错误究竟是什么。
//提示...
}