创建自定义HTML控件? [英] Create a custom HTML control?

查看:1187
本文介绍了创建自定义HTML控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

方案:我的客户有一个HTML拖放编辑器.我必须实施一些措施,以区别他的网页上的一组特定的HTML控件(他在其中输入我们的地址标签)与已经存在的控件(属于他的公司)不同.

我的想法:给他一个自定义控件,该控件始终具有特定的标记或ID,以区别于网页上已经存在的控件.

问题:
我可以创建自定义HTML控件(所有元素,如文本框,表格,输入字段等)并将其提交给他,以便他拖放自定义控件时,ID始终为CustomTextBox1,CustomTextBox2 ...; CustomTable1,CustomTable2 ...; CustomFile1,CustomField2取决于n拖放的元素数?

我如何创建它,请给我一个例子.

Scenario: My Client is having a HTML drag and drop editor. I have to implement something that differentiates a particular set of HTML controls on his webpage(into which he enters our address tag) from already existing controls(belongs to his company).

My Idea:Give him a custom control which always has specific Tag or Id to differentiate from already existing controls on webpage.

Question:
Can i create custom HTML controls (all elements like textbox, table, input field etc) and submit the control to him, so that when ever he drags and drops the custom control, the ID is always CustomTextBox1, CustomTextBox2...; CustomTable1, CustomTable2...; CustomFile1, CustomField2 depending upon n no of elements he drags and drops?

How can i create it, please give me an example.

推荐答案

这不是HTML问题.您不能仅使用HTML来执行此操作,至少必须使用javascript.但是,如果您的JavaScript正在创建控件,则可以清楚地用您喜欢的ID设置它们.
This is not a HTML question. You can''t do this using only HTML, you''d have to use javascript at least. But, if your javascript is creating controls, you can set them with any id you like, clearly.


这篇关于创建自定义HTML控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆