h5+hbuilder 制作手机app |
您所在的位置:网站首页 › 手机h5制作 › h5+hbuilder 制作手机app |
Hbuilderx 下载地址 https://www.dcloud.io/hbuilderx.html 1.依次点击左上角 文件→ 新建→ 项目,会出现下面的界面。 2. index.html (当然,引入的jq.js需要放到项目中) document.addEventListener('plusready', function(){ console.log("所有plus api都应该在此事件发生后调用,否则会出现plus is undefined。"); }); function test(){ $.ajax({ type: 'POST', contentType : "application/json;charsetset=UTF-8", dataType: 'json', url: "http://192.168.43.47:8088/test/login", data:JSON.stringify({userName:'guang'}), success: function(jsonData){ console.log(jsonData.userName); var input=$("#text"); input.val(jsonData.userName) }, error: function(){ console.log("失败!") } }) } 3.在mainfect.json中对项目基本属性做些配置。
|
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |