多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
``` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script> </head> <body> </body> <script> var form = new FormData(); form.append("name", "name1"); form.append("phone", "11111111"); form.append("question1", "A"); form.append("question2", "B"); form.append("question3", "C"); form.append("question4", "C"); form.append("question5", "C"); form.append("answer", "3"); form.append("receive_time_status", "1"); var settings = { "async": true, "crossDomain": true, "url": "http://p76.vp.as1.in/three-game/three-game-v0.3/public/api/giftv313FU68VP5I", "method": "POST", "headers": { "cache-control": "no-cache", "postman-token": "763ebed3-6b8e-198f-03ee-378f6e2decf8" }, "processData": false, "contentType": false, "mimeType": "multipart/form-data", "data": form } $.ajax(settings).done(function (response) { console.log(response); }); </script> </html> ``` ``` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>提交</title> </head> <body> <div class="bg"> <div class="denglu"> <div class="name"> <p>名字</p> <input name="" type="text" id="name"> </div> <div id="tel"> <p>手机号码</p> <input type="text" id="phone" > </div> <div class="btn"> <button>提交</button> </div> </div> </div> </body> <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script> <script> $(".btn").click(function(){ Submbtn() }); function Submbtn(){ var name = document.getElementById('name').value; var phone = document.getElementById('phone').value; console.log() dataUrl(name,phone); } function dataUrl(Name,phone){ total.name = Name; total.phone = phone; console.log(total) // postman start var form = new FormData(); form.append("name", total.name); form.append("phone", total.phone); console.log(form) var settings = { "async": true, "crossDomain": true, "url": "http://p76.vp.as1.in/three-game/three-game-v0.3/public/api/giftv313FU68VP5I", "method": "POST", "headers": { "cache-control": "no-cache" }, "processData": false, "contentType": false, "mimeType": "multipart/form-data", "data": form } $.ajax(settings).done(function (response) { console.log(response); }); // postman end } </script> </html> ```