HTML form values adding commas in Classic ASP(在经典 ASP 中添加逗号的 HTML 表单值)
问题描述
我有一个经典的 ASP 页面,它提交回自身.奇怪的是,从选择返回的值的末尾添加了逗号.有没有人遇到过这样的事情?有没有推荐的故障排除步骤或工具?
I have a classic ASP page that submits back to itself. Strangely, the values being returned from the selects have commas being added to the ends of them. Has anyone run into anything like this before? Any troubleshooting steps or tools recommended?
我希望这些值以数字形式返回 - 它们是选项中显示的值的 ID.
I'm expecting the values to be returned just as numbers - they are the IDs of the values displayed in the option.
我检查了页面中的神秘逗号,但找不到任何 - 也没有在我正在提取的数据中.
I've checked for mystery commas in the page and can't locate any - nor in the data that I'm pulling through.
(注意 - 这些是单选,而不是多选)
(note - these are single-selects, not multiple)
推荐答案
听起来您有重复的表单字段.您的值用逗号连接在一起,如下所示:
Sounds like you have duplicate form fields. Your values are concatenated together with commas, like this:
<input type="text" name="name1" value="value1">
<input type="text" name="name1" value="value2">
<input type="text" name="name2" value="value3">
变成
name1=value1,value2
name2=value3
如果第二个name1没有值,就变成
If the second name1 has no value, it becomes
name1=value1,
name2=value3
这篇关于在经典 ASP 中添加逗号的 HTML 表单值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在经典 ASP 中添加逗号的 HTML 表单值
基础教程推荐
- Bokeh Div文本对齐 2022-01-01
- 即使用户允许,Gmail 也会隐藏外部电子邮件图片 2022-01-01
- 在 contenteditable 中精确拖放 2022-01-01
- Bootstrap 模态出现在背景下 2022-01-01
- 原生拖动事件后如何获取 mouseup 事件? 2022-01-01
- npm start 错误与 create-react-app 2022-01-01
- 如何添加到目前为止的天数? 2022-01-01
- Fabric JS绘制具有活动形状的多边形 2022-01-01
- fetch 是否支持原生多文件上传? 2022-01-01
- 检查 HTML5 拖放文件类型 2022-01-01
