开发者

Jquery invalid regular expression flag r?

开发者 https://www.devze.com 2023-02-17 13:56 出处:网络
I am using codeignitor with jquery. My JS is as following: $(document).ready(function() { var p = {}; $(\'#c开发者_如何学Goontent\').load(/mycontroller/myfunction,p,function(str){

I am using codeignitor with jquery.

My JS is as following:

 $(document).ready(function() {
 var p = {};
   $('#c开发者_如何学Goontent').load(/mycontroller/myfunction,p,function(str){
    });
 });

It gave me an invalid regular expression flag r error on line 3. I am not sure it is a JS error, or the codeignitor mod_rewrite issue.

Can someone please shred some lights?


You need quotes around the path:

"/mycontroller/myfunction"


the .load() function takes a url in the form of a string.

var p = {};
  $('#content').load("/mycontroller/myfunction",p,function(str){
});
0

精彩评论

暂无评论...
验证码 换一张
取 消