四种参数传递的形式——URL,超链接,js,form表单
四种参数传递的形式——URL,超链接,js,form表单
发布时间:2016-12-30 来源:查字典编辑
摘要:什么时候用GET,查,删什么时候用POST,增,改(特列:登陆用Post,因为不能让用户名和密码显示在URL上)4种get传参方式funct...

什么时候用GET, 查,删

什么时候用POST,增,改 (特列:登陆用Post,因为不能让用户名和密码显示在URL上)

4种get传参方式

<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title></title> <script type="text/javascript"> function Go() { window.location.href="localhost:21811/Handler1.ashx" } </script> </head> <body> <> <> localhost:21811/Handler1.ashx" <> <a href="localhost:21811/Handler1.ashx">超链接传递参数</a></body> <> <input type="button" value="通过js方法传递参数" /> <> <form action="Handler1.ashx" method="get"><>> <input type="text" name="id" value="3" /> <input type="text" name="name" value="abc" /> <input type="submit" value="通过传递参数" /> </form> </body> </html>

通过以上具体的实现代码,希望对大家理解这四种参数传递有所帮助。

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新Javascript教程学习
热门Javascript教程学习
编程开发子分类