1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> |
---|
2 | <html> |
---|
3 | <head> |
---|
4 | <title>Tester</title> |
---|
5 | <style type="text/css"> |
---|
6 | #container { background:yellow; width:200px; } |
---|
7 | </style> |
---|
8 | <script type="text/javascript" src="../jquery.js"></script> |
---|
9 | <script type="text/javascript"> |
---|
10 | $(function () { |
---|
11 | $("button:first").click(function () { |
---|
12 | var cd_id = 5; |
---|
13 | var pro_id = 7; |
---|
14 | var data = [{name:"id", value:cd_id}, {name:"pro_id", value:pro_id}]; |
---|
15 | |
---|
16 | var s = jQuery.param(data); |
---|
17 | alert(s); |
---|
18 | }); |
---|
19 | }); |
---|
20 | </script> |
---|
21 | </head> |
---|
22 | <body> |
---|
23 | <button>Do It</button> |
---|
24 | <div id="container"> |
---|
25 | Hi |
---|
26 | </div> |
---|
27 | <div id="adiv"></div> |
---|
28 | </body> |
---|
29 | </html> |
---|