将下拉列表中的多个值添加到1个URL并执行它 [英] Adding multiple values from dropdowns to 1 url and execute it
问题描述
您好。正如标题所说。
i在特定网站的废品促销之前编写了一个程序,并将其保存为文本。
我的程序正在使用添加源的源页面
我手动输入的静态网站是这样的:
sources.Add(https://example.com/?request=getoffers& offertype = bundle& valid = yes& state = AZ& store = foodcity
但是我想添加一个下拉菜单,让用户可以选择他们的城市,他们最喜欢的商店等所以我做了几个组合框下拉,我希望所选的值反映在网址(作为文本),然后是要测试的网址。
这就是我想要做的,我没有设法通过下拉选项自动更新网址并进行扫描。
hello. as title said.
i wrote a program before that scrap promotions from the specific website and save it as text.
my program is using a source page with add source
my static website that i enter manually was like this:
sources.Add("https://example.com/?request=getoffers&offertype=bundle&valid=yes&state=AZ&store=foodcity
but i want to add a drop down to make users to be able to choose their city, their favorite stores etc. so i made few combobox dropdown and i want the selected values to reflect in the url (as text) and then the url to be tested.
this is what i want to do, i did not manage to get the url to be updated automatically with drop down choice and be scanned.
sources.Add("https://example.com/?request=getoffers&offertype=" + ComboBox1.Text() + "&Valid=" + ComboBox4.Text() + "&state=" + ComboBox2.Text() + "&store=" + ComboBox3.Text())
我的组合框看起来如下:
my combobox looks as follow :
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
End Sub
帮助将不胜感激
我尝试过:
help will be appreciated
What I have tried:
sources.Add("https://example.com/?request=getoffers&offertype=" + ComboBox1.Text() + "&Valid=" + ComboBox4.Text() + "&state=" + ComboBox2.Text() + "&store=" + ComboBox3.Text())
推荐答案
最简单的方法是使用jQuery:
取下选择下拉选项的attr或prop然后
更新attr或你的url在dropdown onchange上的道具
The easiest way is to use jQuery :
Take attr or prop of selected option of dropdown then
update attr or prop of your url in dropdown onchange
问题解决了。
i在没有jquery或任何东西的情况下想出来。
i刚刚编码生锈(很长一段时间以外)但我设法捕获数据从下拉列表并将其添加到我的网址
谢谢
Problem solved.
i figured it out without jquery or anything.
i was just becoming rusty at coding (long time away) but i managed to capture data from the dropdown and add it to my url
thanks
我没有创建网络应用程序或网络核心。
这是exe应用程序,我需要在代码中包含一些东西或函数来捕获从下拉列表中选择的数据,并将其反映在用作获取所需内容的源的URL的特定位置。
url有变量,这些都列在下拉列表中。我用jquery脚本不太好用。无法找到整数的方法
im not creating a web app or net core.
this is exe app that i need to include something or a function in the code to capture data chosen from dropdown and reflect it on a specific spot of the url used as a source to grab the desired things.
url has variables and these are all listed in the dropdowns. im not that good with jquery script. couldnt find a way to integer it
这篇关于将下拉列表中的多个值添加到1个URL并执行它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!