-
javascript called with CSS
I was thinking about gmail, and then about my own forum. What if I could program all links to give an alert when you were leaving a message that hadn't been saved/posted.
So... I was thinking... sure... add an onclick, with a confirm, and return false. But then.... perhaps it could be done in CSS.
Is there some way to do that? Set every link to a particular javascript function with onclick. Or perhaps onmouseover for images.
Just thinking... there isn't a specific page I'm trying to fix or anything, but I'm sure it could come in handy.
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
-
Not in CSS.
You can loop through elements with a given classname and add the handler(s) in Javascript, though.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks