//取下拉名称-begin
//-
ls_next=dw_1.Describe('bghnr_lb.values')
li_pos= Pos(ls_next,'/')
forli_i=integer(mid(ls_next,li_pos - 1,1)) to integer(ls_temp)
li_pos= Posw(ls_next,'/')
ifli_pos < 1 then EXIT
ls_now=leftw(ls_next,li_pos- 1)
ls_next=Rightw(ls_next,lenw(ls_next) -li_pos)
next
//
ls_bgnew=leftw(ls_now,lenw(ls_now)-1)
ifPos(ls_bgnew,'~t') > 0 then ls_bgnew =Left(ls_bgnew,Pos(ls_bgnew,'~t') - 1)
//取下拉名称-end
//-
ls_next=dw_1.Describe('bghnr_lb.values')
li_pos= Pos(ls_next,'/')
forli_i=integer(mid(ls_next,li_pos - 1,1)) to integer(ls_temp)
li_pos= Posw(ls_next,'/')
ifli_pos < 1 then EXIT
ls_now=leftw(ls_next,li_pos- 1)
ls_next=Rightw(ls_next,lenw(ls_next) -li_pos)
next
//
ls_bgnew=leftw(ls_now,lenw(ls_now)-1)
ifPos(ls_bgnew,'~t') > 0 then ls_bgnew =Left(ls_bgnew,Pos(ls_bgnew,'~t') - 1)
//取下拉名称-end
本文介绍了一种通过特定脚本语言解析复杂结构下拉列表的方法。该方法利用字符串操作函数如Pos、Mid、Left等来逐级遍历并获取下拉列表中的各项名称。适用于需要从多层次下拉菜单中提取数据的场景。
476

被折叠的 条评论
为什么被折叠?



