[Groonga-commit] droonga/droonga.org at 5138187 [gh-pages] Update sample code and description about "alert()"

Back to archive index

YUKI Hiroshi null+****@clear*****
Tue Sep 10 16:37:16 JST 2013


YUKI Hiroshi	2013-09-10 16:37:16 +0900 (Tue, 10 Sep 2013)

  New Revision: 5138187afc11057e743a70db79001c31efd31574
  https://github.com/droonga/droonga.org/commit/5138187afc11057e743a70db79001c31efd31574

  Message:
    Update sample code and description about "alert()"

  Modified files:
    tutorial/index.md

  Modified: tutorial/index.md (+2 -2)
===================================================================
--- tutorial/index.md    2013-09-10 16:36:06 +0900 (b6fb526)
+++ tutorial/index.md    2013-09-10 16:37:16 +0900 (8282fb7)
@@ -487,7 +487,7 @@ Web ブラウザから Socket.IO 経由でリクエストが frontend に送信
         <script>
           var socket = io.connect();
           socket.on('search.result', function (data) {
-            alert(JSON.stringify(data));
+            document.body.textContent += JSON.stringify(data);
           });
           socket.emit('search', { queries: {
             result: {
@@ -514,7 +514,7 @@ Web ブラウザから Socket.IO 経由でリクエストが frontend に送信
       </body>
     </html>
 
-ブラウザで再度 `http://192.0.2.1:3000` を開くと、以下のような検索結果が alert で表示されます。
+ブラウザで再度 `http://192.0.2.1:3000` を開くと、以下のような検索結果が表示されます。
 
     {"result":{"count":2,"records":[["たいやき工房白家 阿佐ヶ谷店"],["たいやき本舗 藤家 阿佐ヶ谷店"]],"startTime":"2013-08-28T09:23:14+00:00","elapsedTime":0.0030717849731445312}}
 
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index