Using clientside javascript with Rules
Rules is not designed to work with client side events. They way Rules is designed, it won't make any sense to try to make it aware of client side events.

Your best course of action would be to write some custom JavaScript.

If you want to add some javascript code to a page using rules, that would be possible if you created a custom action that added the JavaSript you wanted to the site.