return page history
α-wwwiki
::
history/input/20130604-074456.txt
editor : alpha [82.253.238.99] 2013/06/04 07:44:56 _h1 input _p See [[console]], [[include]], ... {input {@ id="A" type="text" placeHolder="enter a number" }} {input {@ id="B" type="text" placeHolder="enter a number" }} {pre {@ id="C" style="background:#ffe;"}.} {input {@ type="submit" value="compute hypothenuse" onclick="°° var hypo = function ( a, b ) { a = parseInt(a); b = parseInt(b); return Math.sqrt( a*a + b*b ); }; var A = getId('A').value; var B = getId('B').value; getId('C').innerHTML = hypo( A , B ); °°" }} {hr} {input {@ id="rA" type="radio" name="foo" value="A" }A} | {input {@ id="rB" type="radio" name="foo" value="B" }B} | {input {@ id="rC" type="radio" name="foo" value="C" }C} | {input {@ type="submit" value="which radio button is selected ?" onclick="°° var res = 'none'; if (getId( 'rA' ).checked) res = 'rA'; if (getId( 'rB' ).checked) res = 'rB'; if (getId( 'rC' ).checked) res = 'rC'; var which = getId(res); getId('which').innerHTML = (which != null)? which.value : res ; °°" }} It's : {span {@ id="which"}} {hr} {input {@ id="rD" type="checkbox" name="bar" value="0" }D} | {input {@ id="rE" type="checkbox" name="bar" value="0" }E} | {input {@ id="rF" type="checkbox" name="bar" value="0" }F} | _h2 code {pre °° {input {@ id="A" type="text" placeHolder="enter a number" }} {input {@ id="B" type="text" placeHolder="enter a number" }} {pre {@ id="C" style="background:#ffe;"}.} {input {@ type="submit" value="compute hypothenuse" onclick="•• var hypo = function ( a, b ) { a = parseInt(a); b = parseInt(b); return Math.sqrt( a*a + b*b ); }; var A = getId('A').value; var B = getId('B').value; getId('C').innerHTML = hypo( A , B ); ••" }} °°}