Mercurial > urweb
comparison lib/js/urweb.js @ 1099:118ab9641a64
ctextarea; s/header/include in the manual
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 29 Dec 2009 13:34:03 -0500 |
parents | 6e5463a53c3c |
children | 82ac88b4e0a7 |
comparison
equal
deleted
inserted
replaced
1098:c023bc6ab914 | 1099:118ab9641a64 |
---|---|
495 function chk(s) { | 495 function chk(s) { |
496 var x = input(document.createElement("input"), s, | 496 var x = input(document.createElement("input"), s, |
497 function(x) { return function(v) { if (x.checked != v) x.checked = v; }; }, "checkbox"); | 497 function(x) { return function(v) { if (x.checked != v) x.checked = v; }; }, "checkbox"); |
498 x.defaultChecked = x.checked = s.data; | 498 x.defaultChecked = x.checked = s.data; |
499 x.onclick = function() { sv(s, x.checked) }; | 499 x.onclick = function() { sv(s, x.checked) }; |
500 | |
501 return x; | |
502 } | |
503 | |
504 function tbx(s) { | |
505 var x = input(document.createElement("textarea"), s, | |
506 function(x) { return function(v) { if (x.innerHTML != v) x.innerHTML = v; }; }); | |
507 x.innerHTML = s.data; | |
508 x.onkeyup = function() { sv(s, x.value) }; | |
500 | 509 |
501 return x; | 510 return x; |
502 } | 511 } |
503 | 512 |
504 function addOnChange(x, f) { | 513 function addOnChange(x, f) { |