开发者

How to send a URL string to a struct method using ajax

开发者 https://www.devze.com 2023-03-23 19:35 出处:网络
I have a string which is basically a URL \"http://www.demopage.com/sid=23&pop=wsa&jingle=yu Now i want to send this url to the server using agax request. How can i do it.? Just send it as str

I have a string which is basically a URL "http://www.demopage.com/sid=23&pop=wsa&jingle=yu

Now i want to send this url to the server using agax request. How can i do it.? Just send it as string and on th开发者_Python百科e server side parse it.Create and object from it.Transfer the object back as ajax result and then save this object in some input field value.Is this possible..I know m talking crazy..


You do not have to send as object. just send it with the url you have

$.ajax({url: 'ajax/test.html',
          success: function(data) {
             alert(data)  //data will be whatever you print or echo in your php file server side
            }
});

http://api.jquery.com/jQuery.ajax/

0

精彩评论

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

关注公众号