index.html.sio 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>
  6. Pomelo
  7. </title>
  8. <meta http-equiv="content-type" content="text/html;charset=utf-8" />
  9. <meta http-equiv="content-style-type" content="text/css" />
  10. <meta http-equiv="content-scripte-type" content="text/javascript" />
  11. <meta name="author" content="netease" />
  12. <meta name="version" content="1.0" />
  13. <meta name="keywords" content="pomelo" />
  14. <link type="text/css" rel="stylesheet" href="css/base.css" />
  15. <script src="js/lib/socket.io.js">
  16. </script>
  17. <script src="js/lib/pomeloclient.js">
  18. </script>
  19. <script type="text/javascript">
  20. var pomelo = window.pomelo;
  21. var host = "127.0.0.1";
  22. var port = "3010";
  23. function show() {
  24. pomelo.init({
  25. host: host,
  26. port: port,
  27. log: true
  28. }, function() {
  29. pomelo.request("connector.entryHandler.entry", "hello pomelo", function(data) {
  30. alert(data.msg);
  31. });
  32. });
  33. }
  34. </script>
  35. </head>
  36. <body>
  37. <div class="g-doc">
  38. <div class="g-banner" style="border:none">
  39. <div class="logo">
  40. <div class="img"></div>
  41. </div>
  42. </div>
  43. <div class="g-background">
  44. <div class="g-content">
  45. Welcome to Pomelo
  46. </div>
  47. </div>
  48. <div class="g-link">
  49. Home:
  50. <a href="https://github.com/NetEase/pomelo">https://github.com/NetEase/pomelo</a>
  51. </div>
  52. <div class="g-button">
  53. <input id="test" type="button" value="Test Game Server" onclick="show()"/>
  54. </div>
  55. </div>
  56. </body>
  57. </html>