如何使用匹配的字符串填充下拉列表和文本框? [英] how can i populate a dropdown list and textboxes with matched strings?

查看:100
本文介绍了如何使用匹配的字符串填充下拉列表和文本框?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用匹配的字符串填充下拉列表和文本框?我有一个由几个字符和一个普通字符串组成的数组.
我使用了以下内容,但如何使用匹配的字符串填充文本框?

这是我使用的代码:

How can I populate a dropdown list and textbox with the matched strings? I have an array consisting for few characters and a normal string.
I have used the following but how can I use the matched strings to populate textboxes?

Here is the code which I have used:

var populatedata = document.getElementById("<%=txtparse.ClientID %>").value;
  var newdata = new Array();
  newdata = populatedata.split('when');
  for (var i = 0; i < newdata.length; i++) {
      var sign = ["AND", "<", ">", ">=", "<=", "then",' '];
      for (var j = 0; j <= sign.length; j++) {
          var match = newdata[i].match(sign[j]);



txtparse是包含字符串的文本框的ASP.net ID.基于带有符号数组的匹配字符串从此文本框中获取字符串,我必须填充文本框.
:confused::sigh:

请帮我一个忙.



txtparse is the ASP.net ID of the textbox which contains the string. Taking the string from this textbox based on matching strings with sign array I have to populate textbox.
:confused: :sigh:

Kindly help me out.

推荐答案

很抱歉给您带来不便.很容易..再次抱歉..:thumbsup:
sorry for inconvenience guys..well i got the answer.thanks for your support.Actually i was trying this in javascript but c sharp coding was much easier..Sorry again ..:thumbsup:


这篇关于如何使用匹配的字符串填充下拉列表和文本框?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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