paip.從html select 獲取資料
近日。。有個提現模組,使用者需要從select控制項選擇銀行。。可是取到的id值。後台儲存的時候需要儲存銀行名。。
select 的html如下..
請選擇銀行
中國工商銀行
中國農業銀行
中國建設銀行
交通銀行
中國銀行
中國郵政儲蓄銀行
招商銀行
浦發銀行
中信銀行
中國民生銀行
興業銀行
中國光大銀行
北京銀行
廣州銀行
深圳發展銀行
廣東發展銀行
杭州銀行
寧波銀行
華夏銀行
平安銀行
浙商銀行
渤海銀行
如何獲取select html中id對應的值成為乙個問題...
我先是準備用xml獲取,但html不是很嚴格,不符合xml的條件。。最終,我的思路是先把html轉為xml再用xml獲取...使用了.net版的
html解析庫using winista.text.htmlparser;
------------詳細設計(偽碼)--------------
1.儲存html到/banks.txt
2. html=read(curdir+"/banks.txt")
xml=convert(html)
nodelist=getlistbytagname(xml,"option")
foreach nodelist
-----------------實際**----------------
private string getbankname(string xmlstr, string bank)
return "nothisbank";
}
html select 提交問題
action arraylistuserlist new arraylist userlist.add new user 1 合格 userlist.add new user 2 非訂貨 userlist.add new user 3 工段廢品 userlist.add new user 4 退庫廢...
HTMLSelect中操作Option物件
select 物件其實是乙個包含 option 物件陣列的復合物件。select 物件最重要的屬性是 selectedindex,即當前被選中的框中的文字的索引值 用法為 formobject.selectname selectedindex建立乙個 option 物件,即在 標籤中建立乙個或多個 ...
paip 提公升效能 string split
paip.提公升效能 string split 大概一萬次就能看到慢的蘭.split 慢的原因。因為使用了正規表示式的,這樣,就慢的了.作者attilax 艾龍,email 1466519819 qq.com string.split regex 事實上簡單的呼叫了pattern.compile r...