输入
建议使用小写且具有描述性的名称,并用下划线或短横线分隔以便阅读(例如 phone_number 或 contact-tel)。
设置
用于验证的正则表达式(例如 '[0-9]{3}-[0-9]{3}-[0-9]{4}' 对应格式 123-456-7890)。
为元素添加自定义 CSS 类。多个类名请用空格分隔。
输出
HTML
这对您有帮助吗?
使用此工具的更多方式
REST API
curl -X POST https://api.iotools.cloud/v1/tool/html-generator/input-tel \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"customName": "phone-number",
"customLabel": "Phone Number",
"customPlaceholder": "+1 (555) 123-4567",
"customRequired": "",
"customAutocomplete": "true",
"customDisabled": "",
"customReadonly": "",
"customMinLength": "",
"customMaxLength": "",
"customPattern": "",
"customSize": "20",
"customClasses": ""
}'替换成您账户中的密钥。工具的字段即为请求体——没有额外包装。
让 AI 代理执行
Use the IOTools `html-generator__input-tel` tool (HTML Input Tel Generator) on this input:
YOUR_INPUT_HERE将此粘贴给任何已连接 IOTools MCP 服务器的代理,再加上您的输入内容。
嵌入式小组件
<iframe
src="https://iotools.cloud/embed/html-generator/input-tel/"
width="100%" height="520" frameborder="0" scrolling="no" loading="lazy"
title="HTML 电话输入生成器 — iotools.cloud"
sandbox="allow-scripts allow-forms allow-same-origin allow-downloads allow-popups allow-popups-to-escape-sandbox"
allow="clipboard-write"
style="width:100%;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden"></iframe>
<script src="https://iotools.cloud/embed.js" async></script>把它放到您自己的页面上——免费,无需密钥,只需保留一个反向链接。
| 每次 API/MCP 调用费用 | 5 积分起 |
|---|---|
| 需要更多积分? | 查看定价 |
也可通过
使用指南
生成可直接粘贴使用的 <input type="tel"> 字段——设置名称、标签、占位符以及验证规则(必填、模式、最小/最大长度、大小),然后将 HTML 直接复制到您的页面中。tel 类型会在移动设备上调出数字键盘,非常适合输入电话号码。
完全在您的浏览器中运行:无需 AI 调用,不消耗积分,也无需网络往返。输出会随您的输入即时更新。
使用方法
- 设置 名称(用于
name/id属性)和 标签。 - 调整 设置——必填、自动补全、模式、长度限制——以符合表单的验证需求。
- 复制或下载生成的 HTML。
为什么没有实时预览?
输出的是未经净化的原始表单标记(<input>、<label>),直接在页面上渲染并不安全。请将代码粘贴到您自己的页面中,以便在实际环境中查看。
htmlinputtelgeneratorform