使用Javascript创建自定义控件

时间:2021-10-25 01:22:03

I've been trying to do some research into this, but I haven't yet found anything related to this, so I've come here in hopes that someone might be able to point me in the right direction.

我一直试图对此进行一些研究,但我还没有发现任何与此相关的内容,所以我来到这里是希望有人能够指出我正确的方向。

Is there any way at all that we can create our own HTML Elements?

有什么办法可以创建我们自己的HTML元素吗?

I've seen a Custom ComboBox that was created using Javascript months back, but cannot find it anymore.

我见过一个使用Javascript几个月创建的自定义组合框,但是找不到它了。

Basically, I'd like to create my own 'Control', that I can use for my pages. Maybe something that can be just 'plugged in' (although not a requirement). Any thoughts/ideas/advice/links?

基本上,我想创建自己的“控件”,我可以用于我的页面。也许可以“插入”的东西(尽管不是必需的)。有什么想法/想法/建议/链接?

Any help is really appreciated. Thank you!

任何帮助都非常感谢。谢谢!

1 个解决方案

#1


3  

If you want to write a JQuery plug-in but don't know where to start, have a look at this site: http://stefangabos.ro/jquery/jquery-plugin-boilerplate

如果你想编写一个JQuery插件但不知道从哪里开始,请看看这个网站:http://stefangabos.ro/jquery/jquery-plugin-boilerplate

He's written a boilerplate code for a jquery plug-in, with plenty of comments explaining what to do and how to expand it. It should make a good starting point for you.

他为jquery插件编写了一个样板代码,有大量的注释解释了要做什么以及如何扩展它。它应该是你的一个很好的起点。

#1


3  

If you want to write a JQuery plug-in but don't know where to start, have a look at this site: http://stefangabos.ro/jquery/jquery-plugin-boilerplate

如果你想编写一个JQuery插件但不知道从哪里开始,请看看这个网站:http://stefangabos.ro/jquery/jquery-plugin-boilerplate

He's written a boilerplate code for a jquery plug-in, with plenty of comments explaining what to do and how to expand it. It should make a good starting point for you.

他为jquery插件编写了一个样板代码,有大量的注释解释了要做什么以及如何扩展它。它应该是你的一个很好的起点。