Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You have some errors in your html. Form should have "action" attribute, also js is not well.</p> <p>I made example html and js files which works correctly. Html file passed w3.org validation and js passed jslint.</p> <pre> <code> &lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;&gt; &lt;script src=&quot;http://www.google.com/jsapi&quot;&gt;&lt;/script&gt; &lt;script type=&quot;text/javascript&quot;&gt; google.load(&quot;jquery&quot;, &quot;1.4.2&quot;); &lt;/script&gt; &lt;script type=&quot;text/javascript&quot; src=&quot;2988992.js&quot;&gt;&lt;/script&gt; &lt;title&gt;Insert title here&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;form method=&quot;post&quot; name=&quot;com_form&quot; id=&quot;com_form&quot; action=&quot;2988992.html&quot;&gt; &lt;p&gt;What is your name:&lt;br&gt; &lt;input type=&quot;text&quot; name=&quot;nama&quot; id=&quot;nama&quot;&gt; &lt;/p&gt; &lt;p&gt;Leave your comment here:&lt;br&gt; &lt;input type=&quot;text&quot; name=&quot;komentar&quot; id=&quot;komentar&quot;&gt; &lt;/p&gt; &lt;p&gt; &lt;input type=&quot;submit&quot; name=&quot;button2&quot; id=&quot;button2&quot; value=&quot;Submit&quot;&gt; &lt;/p&gt; &lt;/form&gt; &lt;/body&gt; &lt;/html&gt; </code> </pre> <pre> <code> "use strict"; /*global $, alert*/ $(function () { $("#com_form").submit(function () { var name = $("#nama").val(); var komentar = $("#komentar").val(); alert("Hi, " + name + " this is your comment: " + komentar); return false; //prevent standard behavior }); }); </code> </pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload