Home > Web Front-end > JS Tutorial > JS method to automatically add a cell by clicking a button_javascript skills

JS method to automatically add a cell by clicking a button_javascript skills

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 16:10:38
Original
1002 people have browsed it

The example in this article describes the JS method of automatically adding a cell by clicking a button. Share it with everyone for your reference. The specific analysis is as follows:

This is a special effect code for online self-service generation of forms on a web page.
The core function code is implemented in JS. Click the add button on the web page and a cell will be automatically added to the web page

Copy code The code is as follows:



js dynamically generates tables


<script><br> function creates(){<br> newiframes=document.createElement("TABLE")<br> newiframes.id="t1"<br> newiframes.width="100"<br> newiframes.border="1"<br> newiframes.height="100"<br> newiframes.align="left"<br> newiframes.style.background="blue"<br> newiframes.insertRow()<br> newiframes.rows[0].insertCell()<br> document.body.insertBefore(newiframes)<br> }<br> </script>





I hope this article will be helpful to everyone’s JavaScript programming design.

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
Latest Issues
Where is js written?
From 1970-01-01 08:00:00
0
0
0
js file code not found
From 1970-01-01 08:00:00
0
0
0
js addClass not working
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template