1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
slib_lang_exists_tmp=yes
slib_title=Chemical components
slib_parms=4\
, chemical equation\
, [optional] the word <span class="tt">htmlbuttons</span> followed by a space and one number\
, [optional] the word <span class="tt">shuffle</span>\
, [optional] a list of words to be appended, enclosed in brackets. Some words are magical: \
<span class="tt">extra</span> expands to '+,->' ; <span class="tt">redox_extra</span> expands to 'H^+_aq,OH^-_aq,H2O,e^-'.
slib_out= Outputs a matrix of the reactives in the first line, and the products in \
the second line. <br/>If the parameter <span class="tt">htmlbuttons</span> is specified, the output \
is some code to make clickable buttons; then, the number refers to a reply \
field which will receive the results of the buttons' events. <br/>If the \
parameter <span class="tt">shuffle</span> is specified, the buttons are shuffled. <br/>These buttons \
can be made active if the following javascript code is added in the page: \
<pre style="color:green;">\
<script type="text/javascript">\
function getInput(n){\
f=window.document.forms[0];\
for(i=0; i<f.elements.length; i=i+1){\
if (f.elements[i].name=="reply"+n) { \
return f.elements[i];\
}\
}\
return null;\
}\
function appendToInput(n,msg){\
var i=getInput(n);\
i.value=i.value+msg+' ';\
i.focus();\
}\
</script>\
</pre>
slib_comment=use the syntax accepted by the command chemeq
|