IE8 Jquery 1.8.3问题:语法错误第2行图表13575

时间:2013-07-16 14:30:57

标签: javascript jquery internet-explorer-8 ie8-compatibility-mode

我遇到问题Jquery 1.8.3IE8我遇到的问题是,当我用IE8打开网页时,我有下一个错误,我无法提交表格:

  

语法错误Jquery 1.8.3.js Sintax错误行:2 char:13575

我认为我的问题出在我的javascript上,但我不知道我错过了什么:

JavaScript Web Page

提前谢谢! :d

修改

网页适用于IE >= 10

1 个答案:

答案 0 :(得分:0)

您的问题出现了,因为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还是webserver错误?