表单 action, 链接href,js 绑定按钮 ajax绑定标签

<h1>通过表单提交参数</h1>
        <form action="/day46_v1/ServletDemo01?method=addUser" method="post">
            用户名:<input type="text" name="username"/><button>提交</button>
        </form>
        <h1>通过链接提交参数</h1>
        <a href="/day46_v1/ServletDemo01?method=delUser&uid=003">删除</a>
        <h1>通过Ajax提交参数</h1>
        <input type="text" name="username"/><button onclick="fn()">发送请求</button>
        <h1>通过JS发送请求</h1>
        <button onclick="fm()">点击我向服务端发起请求</button>

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-05
  • 2021-08-18
  • 2022-01-03
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-07
  • 2022-12-23
  • 2021-12-07
  • 2022-02-27
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案