The code below will create a green link (Proteopedia's links that interact with applets are green) with the text 'label atoms' that will execute the script inside <script> and </script>. These are simple examples. You may use longer scripts.
<jmol>
<jmolLink>
<script>select all;label "%a";select _H;label off;select all;</script>
<text>label atoms</text>
</jmolLink>
</jmol>
Replacing 'jmolLink' by 'jmolButton' will draw a button.
<jmol>
<jmolButton>
<script> select all; labels off; </script>
<text>Turn off labels</text>
</jmolButton>
</jmol>
The code below draws this checkbox
<jmol>
<jmolCheckbox>
<scriptWhenChecked>select all;label "%a";select _H;label off;select all;</scriptWhenChecked>
<scriptWhenUnchecked>select all; labels off;</scriptWhenUnchecked>
<text>show labels</text>
</jmolCheckbox>
</jmol>