且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

任何用css样式动态添加输入元素到html页面的方法?

更新时间:2023-09-02 09:57:52

请参阅我对该问题的评论。很明显,没有问题的描述=>没有答案。



但是,我可以给你一个建议:你对HTML DOM元素的操作越简单,错误的可能性就越小。为了大大简化它,您可以使用jQuery。请参阅Manipulation类别中的jQuery方法:

http://api.jquery.com/category/操纵/ [ ^ ],

http://api.jquery.com/category/manipulation/dom-insertion-around / [ ^ ] ,

http://api.jquery.com/category/manipulation/ dom-insertion-inside / [ ^ ],

http://api.jquery.com / category / manipulation / dom-insertion-outside / [ ^ ]。



如果您需要学习jQuery(强烈推荐),请参阅:

http://en.wikipedia。 org / wiki / JQuery [ ^ ],

http://jquery.com/ [ ^ ],

http://learn.jquery。 com / [ ^ ],

http://learn.jquery.com/using-jquery-core/ [ ^ ],

http://learn.jquery.com/about-jquery/how-jquery-works/ [ ^ ](从这里开始) 。



祝你好运,

-SA
Please see my comment to the question. Quite apparently, no description of the problem => no answer.

However, I can give you an advice: the simpler your manipulations on the HTML DOM elements, the less likely the bugs. To simplify it greatly, you can use jQuery. Please see the jQuery methods in Manipulation category:
http://api.jquery.com/category/manipulation/[^],
http://api.jquery.com/category/manipulation/dom-insertion-around/[^],
http://api.jquery.com/category/manipulation/dom-insertion-inside/[^],
http://api.jquery.com/category/manipulation/dom-insertion-outside/[^].

If you need to learn jQuery (highly recommended), please see:
http://en.wikipedia.org/wiki/JQuery[^],
http://jquery.com/[^],
http://learn.jquery.com/[^],
http://learn.jquery.com/using-jquery-core/[^],
http://learn.jquery.com/about-jquery/how-jquery-works/[^] (start from here).

Good luck,
—SA