Mercurial > urweb
comparison lib/js/urweb.js @ 1835:a8b273f1f7e3
add Placeholder attribute to <password>; change <textbox> code generation to set 'type' to 'text'
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Fri, 30 Nov 2012 10:02:13 -0500 |
parents | aadfc1a138d8 |
children | e15234fbb163 |
comparison
equal
deleted
inserted
replaced
1834:690638bd9fef | 1835:a8b273f1f7e3 |
---|---|
1002 function inp(s, name) { | 1002 function inp(s, name) { |
1003 if (suspendScripts) | 1003 if (suspendScripts) |
1004 return; | 1004 return; |
1005 | 1005 |
1006 var x = input(document.createElement("input"), s, | 1006 var x = input(document.createElement("input"), s, |
1007 function(x) { return function(v) { if (x.value != v) x.value = v; }; }, null, name); | 1007 function(x) { return function(v) { if (x.value != v) x.value = v; }; }, "text", name); |
1008 x.value = s.data; | 1008 x.value = s.data; |
1009 x.onkeyup = x.oninput = x.onchange = x.onpropertychange = function() { sv(s, x.value) }; | 1009 x.onkeyup = x.oninput = x.onchange = x.onpropertychange = function() { sv(s, x.value) }; |
1010 | 1010 |
1011 return x; | 1011 return x; |
1012 } | 1012 } |