HTML表单值在经典ASP中添加逗号 [英] HTML form values adding commas in Classic ASP

查看:83
本文介绍了HTML表单值在经典ASP中添加逗号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个经典的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

这篇关于HTML表单值在经典ASP中添加逗号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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