Home > Web Front-end > JS Tutorial > Example of moving a drop-down list select from the left border to the right_javascript skills

Example of moving a drop-down list select from the left border to the right_javascript skills

WBOY
Release: 2016-05-16 17:10:46
Original
1343 people have browsed it

When the following statement is called when the page has not been loaded, the "add" object cannot be obtained, and the prompt is empty or not an object

Copy code The code is as follows:

document.getElementById("add").onclick = function(){
alert("hello");
}

Objects that are available when used
Copy code The code is as follows:

window. onload = function(){
document.getElementById("add").onclick = function(){
alert("hello");
}
}

Copy code The code is as follows:





















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