Home > Web Front-end > JS Tutorial > Solution to the problem that IE6 cannot modify the name_javascript skills

Solution to the problem that IE6 cannot modify the name_javascript skills

WBOY
Release: 2016-05-16 18:20:22
Original
929 people have browsed it

The NAME attribute cannot be set at run time on elements dynamically created with the createElement method.
To create an element with a name attribute, include the attribute and value when using the createElement method.
That is, you have to Write like this

Copy the code The code is as follows:

document.createElement('');

It doesn't look good, and it does not support FF.
If you use Jquery's clone method, and then want to copy Modifying the name attribute of the element will not succeed. The simpler way is to create a new one and then delete the original one.
Copy code The code is as follows:

$('').appendTo(xxx.parent());
xxx.remove();
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