Inhaltsverzeichnis Smarty Smarty Funktionen {input} Button

Button

Einen Button ausgeben.

Attribut  Typ  Erforderlich  Beschreibung 
onclick  string  Nein Javascript, welches beim Klick ausgeführt werden soll.
label  string  Nein Die Beschriftung des Buttons.

Vorschau

 button_1

Beispiel

QuelltextSmarty Code:
  1. <form name="extra">
  2. <div align="center">
  3. <table class="table">
  4.     <tr>
  5.         <td class="cell">
  6.             {input version=5 type="button" name="input_test" title="Dies ist ein button" onclick="javascript:test()"}
  7.             <br />
  8.         </td>
  9.     </tr>
  10.            
  11. </table>
  12. </div>
  13. </form>
  14. {literal}
  15. <script language="javascript">
  16. <!--
  17. function test()
  18. {
  19.     alert('Hallo');
  20. }
  21. //-->
  22. </script>
  23. {/literal}