查看文件: skybni2.html
大小: 1.34 KB
类型: text/html
<html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <title>Test</title> </head> <body> <form name="testform" method="post"> <div id="main" border="5" style="width:100%; height:100%;"> <div id="sub" style="width:50%; height:50%;align:center;"> Username:<input type="text" name="uname"> <input type="button" name="ok" value="submit" onClick="getResponse();"> </div> </div> </form> <script type="text/javascript"> function getResponse() { var uname=document.testform.uname.value; alert(uname); $.ajax({ type: 'POST', // url: 'http://192.168.2.113/crm/webservice.php?operation=getchallenge&username='+uname, url: 'https://www.skybni.com/user/addapiuser.html?mobile=0912591892&email=yskin@gmail.com&name='+uname, data: {}, dataType: 'json', success: function(data) { alert('got here with data'); }, error: function() { alert('something bad happened'); } }); } </script> </body> </html>
保存
取消
返回文件列表