How can i add a script to an element ?

User 2726830 Photo

Registered User
3 posts

I would like to add a script to some kind of element that is not a button. It can be a dropdown element, a text element, etc.
Any ideas ? Thanks !
User 379556 Photo

Registered User
1,011 posts

I have used the Attributes facility on the Body element to reference small js files. For example, I have a page in which I have (without the inverted commas) the Name as 'onload', and the Value as functions (which are in .js files) 'pageNum(); cover();'

I attach a simple example of where I put a tiny script for an HTML element directly into the Value section of an Attribute with the Name 'oninput'.

The possibilities seem endless.


Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.