阅读背景:

在循环浏览每个输入时从select中获取文本

来源:互联网 

I am grabbing all inputs from a 5 tab form. When cyclying through them I am adding them to a review section. I have it working fine but I want to show the text of the select drop downs rather then the value as the value would not make sense to the user. Here is a couple of snippets of code I am using. This is inside and $(:input.each(function(){} I check to see if it is a select. If so I set a tmp variable and add on '_in' to the name as I have all field names plus that on the confirm tab. Then I check the length of the new variable to make sure it is on the confirmation tab. If so update the html to the text. The issue is it shows all drop down text options. If I do .val() it gives only the value of the selected one. I am grabbing all inputs from a 5 tab form. Whe




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: