123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148 |
- <!DOCTYPE html>
- <html>
- <!--
- Copyright 2006 The Closure Library Authors. All Rights Reserved.
- Use of this source code is governed by the Apache License, Version 2.0.
- See the COPYING file for details.
- -->
- <head>
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta charset="UTF-8" />
- <title>Closure Unit Tests - goog.dom.forms</title>
- <script src="../base.js"></script>
- <script>
- goog.require('goog.dom.formsTest');
- </script>
- </head>
- <body>
- <!-- empty div to test against -->
- <div id="testdiv1"></div>
- <form id="testform1" action="https://foo.bar/baz" onsubmit="return false">
- <!-- text input with one value -->
- <input id="in1" name="in1" value="foo">
- <!-- text inputs with two values -->
- <input id="in2" name="in2" value="bar">
- <input id="in2" name="in2" value="baaz">
- <!-- empty text input -->
- <input id="in3" name="in3" value="">
- <!-- password -->
- <input id="pass" name="pass" type="password" value="bar">
- <!-- textarea -->
- <textarea id="textarea1" name="textarea">foo bar baz</textarea>
- <!-- select single -->
- <select id="select1" name="select1">
- <option value="1" selected>one</option>
- <option value="2">two</option>
- </select>
- <!-- select multiple -->
- <select id="select2" name="select2" multiple=true>
- <option value="a" selected>A</option>
- <option value="b">B</option>
- <option value="c" selected>C</option>
- </select>
- <!-- select no value -->
- <select id="select3" name="select3">
- <option></option>
- <option value="1">one</option>
- <option value="2">two</option>
- </select>
- <!-- checkboxes -->
- <fieldset id="testfieldset1">
- <legend id="testlegend1">Checkboxes</legend>
- <input id="checkbox1" type="checkbox" name="checkbox1" checked>
- <input id="checkbox2" type="checkbox" name="checkbox2">
- </fieldset>
- <!-- radio buttons -->
- <fieldset>
- <legend>Radio Buttons</legend>
- <input id="radio1" type="radio" name="radio" value="X" checked>
- <input id="radio2" type="radio" name="radio" value="Y">
- </fieldset>
- <fieldset>
- <legend>Radio Buttons</legend>
- <input id="radio3" type="radio" name="radio2" value="X">
- <input id="radio4" type="radio" name="radio2" value="Y" checked>
- </fieldset>
- <!-- button -->
- <button id="button" name="button" type="button" value="button" onclick="testSetValueSelectMultiple()">button</button>
- <!-- submit -->
- <input id="submit" type="submit" name="submit" value="submitv" formaction="https://foo.xyz/baz">
- <!-- reset -->
- <input id="reset" type="reset" name="reset" value="reset">
- <!-- submit -->
- <button id="submitb" name="submit" value="submitb" formaction="https://foo.xyz/baz">
- Submit
- </button>
- </form>
- <form id="testform2">
- <input type="file" name="file">
- </form>
- <form id="testform3">
- <!-- text input -->
- <input id="in4" name="in4">
- <!-- textarea -->
- <textarea id="textarea2" name="textarea"></textarea>
- <!-- select single -->
- <select id="select4" name="select1">
- <option value="1">one</option>
- <option value="2">two</option>
- </select>
- <!-- select multiple -->
- <select id="select5" name="select5" multiple=true>
- <option value="a">A</option>
- <option value="b">B</option>
- <option value="c">C</option>
- </select>
- <!-- radio -->
- <input id="radio3" type="radio" name="radio3" value="Z">
- <!-- checkbox -->
- <input id="checkbox2" type="checkbox" name="checkbox2">
- <!-- select multiple no value -->
- <select id="select6" name="select6" multiple=true>
- <option value="a">A</option>
- <option value="b">B</option>
- </select>
- <!-- select with empty value -->
- <select id="select7" name="select7">
- <option value="">Empty</option>
- <option value="a">A</option>
- <option value="b">B</option>
- </select>
- </form>
- <form id="testform4">
- <embed ></embed>
- <embed type="foo/bar"></embed>
- <object></object>
- </form>
- </body>
- </html>
|