我在使用 Jquery 1.8.3
和 IE8
时遇到问题,我遇到的问题是目前我使用 IE8< 打开网页
我遇到下一个错误,无法提交表单:
Syntax error Jquery 1.8.3.js Sintax Error line: 2 char: 13575
我认为我的问题出在我的 javascript 上,但我不知道我错过了什么:
提前致谢! :D
编辑
该网页适用于 IE >= 10
最佳答案
出现问题是因为 IE8 和其他浏览器的 function_form 输出不同。在 IE 中,您会得到如下响应(错误 500,是 html):
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>500 Internal Server Error</title>
</head><body>
<h1>Internal Server Error</h1>
<p>The server encountered an internal error or
misconfiguration and was unable to complete
your request.</p>
<p>Please contact the server administrator,
root@localhost and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.</p>
<p>More information about this error may be available
in the server error log.</p>
<hr>
<address>Apache/2.2.15 (CentOS) Server at carlyleonline.scalahed.com Port 80</address>
</body></html>
然后失败并显示:
var datas = $.parseJSON(data.responseText);
另一方面,其他浏览器返回正确的 JSON:
{"errores": {"entidad": ["Este campo es obligatorio."], "fecha_nacimiento": ["Este campo es obligatorio."], "apellido_paterno": ["Este campo es obligatorio."], "carlyle_lic1": ["Seleccione al menos una licenciatura."], "celular": ["Proporcione un n\u00famero telef\u00f3nico."], "nombre": ["Este campo es obligatorio."], "email": ["Este campo es obligatorio."]}}
您能否向我们展示您的逻辑,该逻辑确定响应应该是 json 还是网络服务器错误?
关于javascript - IE8 Jquery 1.8.3 问题 : Syntax error line 2 chart 13575,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17679371/