Monday, 15 June 2015

javascript - I called Socket.io function and Uncaught TypeError: undefined is not a function -


I am creating a socket. Oo chat application, and I have trouble on JavaScript.

This is my javascript file (customer)

  & lt; Script src = "https://cdn.socket.io/socket.io-1.2.0.js" & gt; & Lt; / Script & gt; & Lt; Script src = "https://code.jquery.com/jquery-1.10.2.js" & gt; & Lt; / Script & gt; & Lt; Script & gt; $ (Document) .ready (function () {// a new chat div $ ("# theme_button"). Click (function (e) {e.preventDefault () var domElement = $ ('& lt; div class = "Content" & gt; div class = "message" & gt; & lt; ul class = "other_material" class = "title"> gt; & lt; h3 & gt; '+ $ ("# m" ). Val () + '& lt; / h3 & gt; & lt; / ul & gt;' + '상대방' + '
"+' 내 메시지 '+'

"socket.emit ('chat message', $ ('chat_form'). FirstChild (). Val ());" Undefined type brings error: There is no undefined function

And I think this is about the Javascript problem Can anyone help me?


No comments:

Post a Comment