请问如何将一个常量替换成变量?

高_114525 2020-5-7 707

各位大佬,需要网页填表

原句子:

Mouse.Action({"wnd":[{"cls":"Chrome_WidgetWin_1","title":"*","app":"chrome"},{"cls":"Chrome_RenderWidgetHostHWND","title":"Chrome Legacy Window"}],"html":{"tagName":"A","attrMap":{"tag":"A","parentid":"table-cvp-invoiceAddList-list1","aaname":"请输入发票代码","tableRow":"5"},"index":0}},"left","click",10000,{"bContinueOnError":false,"iDelayAfter":300,"iDelayBefore":200,"bSetForeground":true,"sCursorPosition":"Center","iCursorOffsetX":0,"iCursorOffsetY":0,"sKeyModifiers":[],"sSimulate":"simulate"})


请问标红的地方应该如何做成一个变量呢?

最新回复 (4)
  • ou 2020-5-7
    2
    变量替代引号包含的内容及引号就是
  • 高_114525 2020-5-7
    3
    ou 变量替代引号包含的内容及引号就是
    其实真正需要替换的就是这个5,可是我把“5”换成了i,就不认了,i已经事先赋值了.
  • 王超然 2020-5-7
    4
    ["html"]["attrMap"]["tableRow"]=""i
  • 孙毅 2020-5-9
    5
    dim temp = ""
    temp = {"wnd":[{"cls":"Chrome_WidgetWin_1","title":"*","app":"chrome"},{"cls":"Chrome_RenderWidgetHostHWND","title":"Chrome Legacy Window"}],"html":{"tagName":"A","attrMap":{"tag":"A","parentid":"table-cvp-invoiceAddList-list1","aaname":"请输入发票代","tableRow":"5"},"index":0},"sCursorPosition":"Center","iCursorOffsetX":0,"iCursorOffsetY":0,"sKeyModifiers":[],"sSimulate":"simulate"}
    temp["html"]["attrMap"]["tableRow"] = "6"
    TracePrint(temp)
返回
发新帖