• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 18. Scripts > Creating a Button that Executes a Script

Creating a Button that Executes a Script

You can associate a button with a script to give your visitor full control over when the script should be executed.

To create a button that executes a script

1.
Type <button type=“button”.

2.
Type name=“name”, where name is the identifier for the button.

3.
Type onclick=“script”, where script is the code (usually JavaScript) that will run when the visitor clicks the button.

4.
If desired, type style=“font: 14pt Lithos Regular; background:red” (or whatever) to change the appearance of the text on the button.

5.
Type >.

6.
If desired, type the text that should appear on the button.

7.
Type </button>.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint