在FF中工作但不在chrome中工作(Works in FF but not in chrome)

编程入门 行业动态 更新时间:2024-10-18 12:21:57
在FF中工作但不在chrome中工作(Works in FF but not in chrome)

这与Codeignitor,Ajax和Jquery有关

以下代码在Firefox和chrome中工作正常我需要在url中进行更改

像url:create(这是针对Firefox)就像url:users / create(这适用于Chrome,但在Firefox中不起作用)

请注意我是codeignitor的新手,所以不知道我是否犯了错误

项目正在CodeIgniter中开发

$.ajax({ type: "POST", url: "create", data: "full_name="+full_name, success: function(returned_html){ //Do Something here }, error: function (XMLHttpRequest, textStatus, errorThrown){ alert("Error with ajax Function: "+ textStatus+" "+errorThrown); } });

This is related with Codeignitor, Ajax and Jquery

Following code works fine in Firefox and for chrome I need to make change in url

like url: create (This is for Firefox) like url: users/create (This is for Chrome and it doesn't work in Firefox)

Please note that I am new to codeignitor so don't know if I made a mistake there

Project is being developed in CodeIgniter

$.ajax({ type: "POST", url: "create", data: "full_name="+full_name, success: function(returned_html){ //Do Something here }, error: function (XMLHttpRequest, textStatus, errorThrown){ alert("Error with ajax Function: "+ textStatus+" "+errorThrown); } });

最满意答案

您可以使用非相对网址,因为我认为Firefox和Chrome没有相同的基本路径。

url : 'http://.../create'

You can use a non-relative url because I think Firefox and Chrome does not have the same base path.

url : 'http://.../create'

更多推荐

本文发布于:2023-08-01 11:34:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1358019.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:工作   FF   Works   chrome

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!