javascript-events
what can i put in beforeUnload?
I would like to have an animation effect which starts when people leave a page. I use this currently:[详细]
2023-04-08 00:33 分类:问答Handling onclick events
I have a list which contains links . I am using this code to access them: function initAll() { var allLinks = document.getElementById(\"nav\").getElementsByTagName(\"a\");[详细]
2023-03-27 09:24 分类:问答get character typed, cross-browser
Simple question -- Does anyone know of a reliable cross-browser function to get the character typed from a keydown event?I can write one from the quirksmode grid but would rather not re-invent the whe[详细]
2023-03-10 05:28 分类:问答What is "javascript:" in a JavaScript event handler?
What is javascript: 开发者_运维技巧in a JavaScript event handler? Such as: <input onkeydown=\"javascript:return false;\" type=\"text\" name=\"textfield\" />[详细]
2023-03-09 13:36 分类:问答mouseenter without JQuery
What wou开发者_JAVA技巧ld be the best way to implement a mouseenter/mouseleave like event in Javascript without jQuery? What\'s the best strategy for cross browser use? I\'m thinking some kind of chec[详细]
2023-03-08 15:14 分类:问答Trying to call two functions on the same input field but only calls one
I have two working functions which I want to assign to two inputs: <input type=\"text\" id=\"start0\" value=\"0\" name=\"start[]\" onkeyup=\"displayTotal();\"/>[详细]
2023-03-05 08:43 分类:问答attachEvent / addEventListener to Window onload / load - preferred way
I have a script that starts when the page loads and I had been using this code below to start it: if (window.addEventListener) {[详细]
2023-02-19 15:10 分类:问答JavaScript event object?
I was told that an \'event object\' gets passed as a parameter to the function in the program below. What would an example of an \'event object\' be? Is it, for example, the <p> element if you c[详细]
2023-02-18 09:06 分类:问答Calling javascript class method using this keyword in addeventlistener
I want to call the javascript class method using addEventListener with parameters using this keyword var _this = this;[详细]
2023-02-15 13:39 分类:问答getAttribute isn't working
I have this <body> <div id=myid0 i=\'Keliot\'> 0</div> <div id=myid1 i=\'Ukonh\'>1</div>[详细]
2023-02-11 10:46 分类:问答