In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article introduces the relevant knowledge of "how to use XMLHTTP to achieve two-level connected Select". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
Using XMLHTTP. We can achieve a lot of good ideas.
This article. Realize the two-level linkage Select.
The traditional two-level linkage is to send all the data to the client..
Using XMLHTTP. We can return the data we need in real time.
Select.htm
The code is as follows:
Function GetResult (str)
{
/ *
*-GetResult (str)-
* GetResult (str)
* function: send a request through XMLHTTP and return the result.
* parameters: str, string, sending condition.
* instance: GetResult (document.all.userid.value)
* author:wanghr100 (grey bean baby. Net)
* update:2004-5-27 19:02
*-GetResult (str)-
, /
Var oBao = new ActiveXObject ("Microsoft.XMLHTTP")
OBao.open ("POST", "Server.asp?sel=" + str,false)
OBao.send ()
/ / the server-side processing returns a string encoded by escape.
/ / return data through XMLHTTP and start building Select.
BuildSel (unescape (oBao.responseText), document.all.sel2)
}
Function BuildSel (str,sel)
{
/ *
*-BuildSel (str,sel)-
* BuildSel (str,sel)
* function: build Select through str.
* Parameter: str, string, returned by the server. There is a specific structure "string 1, string 2, string 3"
* Parameter: sel, the Select to be built
* instance: BuildSel (unescape (oBao.responseText), document.all.sel2)
* author:wanghr100 (grey bean baby. Net)
* update:2004-5-27 19:02
*-BuildSel (str,sel)-
, /
/ / clear the original data first.
Sel.options.length=0
Var arrstr = new Array ()
Arrstr = str.split (",")
/ / start building a new Select.
For (var iTuno Bandi)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.