Cocos Creator 调用php接口,c#,java思路相同

前端之家收集整理的这篇文章主要介绍了Cocos Creator 调用php接口,c#,java思路相同前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
  1. var url="jk.PHP";
  2. var xhr = new XMLHttpRequest();
  3. xhr.onreadystatechange = function () {
  4. if (xhr.readyState == 4 && (xhr.status >= 200 && xhr.status < 400)) {
  5. var response = xhr.responseText;
  6. console.log("server response:"+response);
  7. }
  8. };
  9. xhr.open("GET",url,true);
  10. xhr.send();

其实就是原生的js方法

要想办法引入jq

猜你在找的Cocos2d-x相关文章