Skip to main content

Bug Tracker

Side navigation

Ticket #1662: jquery_test.html
File jquery_test.html, 1.0 KB (added by davidserduke, December 06, 2007 02:37AM UTC)

test case

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <title>Tester</title>
    <style type="text/css">
      #container { background:yellow; width:200px; }
    </style>
    <script type="text/javascript" src="../jquery.js"></script>
    <script type="text/javascript" src="script.js"></script>
    <script type="text/javascript">
      function useVal() {
        $("#textinput").val("Voc� j� deu sua avalia��o a esse livro.");
        $("#textinput2").val("J�rn");
      }

      $(function () {
        $("button:first").click(function () {
              showUnicode();
            });
        $("button:last").click(function () {
              useVal();
            });
      });
    </script>
  </head>
  <body>
    <button>Use .text()</button>
    <button>Use .val()</button>
    <div id="container">
      Hi
    </div>
    <input type="text" id="textinput" />
    <input type="text" id="textinput2" />
    <div id="adiv"></div>
  </body>
</html>

Download in other formats:

Original Format