Debian Codegraph @

closure-library/closure/goog/demos/labelinput.html

raw
1 <!DOCTYPE html>
2 <html>
3 <!--
4 Copyright 2010 The Closure Library Authors. All Rights Reserved.
5
6 Use of this source code is governed by the Apache License, Version 2.0.
7 See the COPYING file for details.
8 -->
9 <head>
10 <title>goog.ui.LabelInput</title>
11 <link rel="stylesheet" href="css/demo.css">
12 <style>
13 .label-input-label {
14 color: GrayText;
15 }
16 </style>
17 <script src="../base.js"></script>
18 <script>
19 goog.require('goog.ui.LabelInput');
20 goog.require('goog.dom');
21 </script>
22 </head>
23 <body>
24 <h1>goog.ui.LabelInput</h1>
25 <p>This component decorates an input with default text which disappears upon focus.</p>
26 <form>
27 <input id=i name=i label='Search, add, or invite 1'>
28 <div id=d></div>
29 <script>
30 var $ = goog.dom.getElement;
31
32 var li1 = new goog.ui.LabelInput;
33 li1.decorate($('i'));
34
35 var li2 = new goog.ui.LabelInput('Search, add, or invite 2');
36 var el = li2.render($('d'));
37 li2.getElement().name = 'dynamic';
38 </script>
39 <button type="button">Faux Submit</button>
40 </form>
41 </body>
42 </html>