Home > Web Front-end > JS Tutorial > Dynamically add js code examples for events_javascript skills

Dynamically add js code examples for events_javascript skills

WBOY
Release: 2016-05-16 18:56:05
Original
807 people have browsed it
Copy code The code is as follows:



< ;script language="javascript">
attachEvent("onblur", blur);
function blur()
{
document.all.form.username.attachEvent("onblur", blur );
if(event.srcElement == document.all.form.username){
alert("efewef");
}
}








The execution order is:
execute alert("hello") first;
then execute alert("efewef");
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template