faqts : Computers : Programming : Languages : JavaScript : Event handling

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

6 of 27 people (22%) answered Yes
Recently 1 of 10 people (10%) answered Yes

Entry

Are there any ways to modify an event handler dynamically?

Aug 9th, 2001 03:44
Hiroto Sekine, http://www.all.co.nz/support/edo/index.htm


With IE5.x and above
HTML
<input type='button' title='xxxxx' value='xxxxxxx' 
onclick='(condition) ? func1() : func2();' />
This code switch to either func1 or func2 by the condition.
Try the active sample html page and see the active sample code.