Jump to content

Search the Community

Showing results for tags 'addEventListener'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Calendars

  • Community Calendar

Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 1 result

  1. addEventListener method

    Hi everyone, According to the explanation about this method here, it accepts three parameters: - new event created in runtime; - anonymous (or not) function; - a third parameter (boolean). I would like to know if the first parameter can be a variable such as "newEvent" instead to write as literal ("click") E.g.: function myfunction(myId, newEvent) { document.getElementById(myId).addEventListener(newEvent, function(){ ... }); } Is this possible? My idea is pass a value to my function as parameter to 'addEventListener' method. Thanks in advance. Best regards.
×