当前位置:编程学习 > JS >>

VB程序中的问题

我获取到一串字符串,如:<script type="text/javascript">var myLink = $('#xxxx');var linkFormat = $(myLink).attr('f');$('#ddd').calendar({ Skin:'black', Event_SelectDate:function(e, arg){ $(myLink).attr('href', String.format(linkFormat, arg)); } });xxxx.initialize(4, [{"i":"xx","b":"xxx","s":0,"ed":"xx"},{"i":""..........}

我想从xxxx.initialize开始,拿{符号作为分隔符进行分割,并取出b:后边的值

求高人指点 紧急... 谢谢!
程序是VB的  用到Mid  left right 什么什么的 诶呀! 如果不知道 可以告知一下 用Mid如何从指定的字符位置截取到结尾嘛? 
追问:嗯 是的!
答案:
 Dim s As String
     Dim s2 As Variant
     
     s = "<script type=""text/javascript"">var myLink = $('#xxxx');var linkFormat = $(myLink).attr('f');$('#ddd').calendar({ Skin:'black', Event_SelectDate:function(e, arg){ $(myLink).attr('href', String.format(linkFormat, arg)); } });xxxx.initialize(4, [{""i"":""xx"",""b"":""xxx"",""s"":0,""ed"":""xx""},{""i"":""""..........}"
     s = Mid(s, InStr(1, s, "xxxx.initialize") + Len("xxxx.initialize"), Len(s))
     s2 = Split(s, "{")
     MsgBox s2(1)
 你要获取(4, [{"i":"xx","b":"xxx","s":0,"ed":"xx"},{"i":""..........}一直到结尾?

上一个:求高手详细解答JAVA循环体问题
下一个:c++中声明变量用var 运算符吗???不用,那用什么???

CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,