weixin_33688840 2010-03-22 10:52 采纳率: 0%
浏览 10

jQuery ajax类型GET问题

I hava a simple question. I have a server running which take actions according to parameters in the url.

Example: if I type in browser: http://localhost:8081/Edit?action=renameModule&newName=Module2

This works correctly.

I would like to know the equivalent jquery ajax method to perform the same thing

I have tried

$.ajax({ url: 'http://localhost:8081/Edit', type: 'GET', data:'action=renameModule&newName=Module2 });

It is not working.

I would be very grateful for any help.

Thanks

  • 写回答

2条回答 默认 最新

  • weixin_33721344 2010-03-22 10:55
    关注

    why can't you use

    $.ajax({ 
        url: 'http://localhost:8081/Edit?action=renameModule&newName=Module2', 
        type: 'GET' 
    });
    

    edit : in the example you supplied, you're missing a ' from the end of the data param, maybe that is the problem?

    评论

报告相同问题?

悬赏问题

  • ¥15 Stata 面板数据模型选择
  • ¥20 idea运行测试代码报错问题
  • ¥15 网络监控:网络故障告警通知
  • ¥15 django项目运行报编码错误
  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用