下面的例子是在文件的指定位置增加指定字符串的例子 修改配置文件: def add_str(pre_str): lines = [] flag = True f = open("z.txt") for line in f: lines.append(line) if line.strip("\n ") == "</se.diabol.jenkins.pipeline.DeliveryPipelineView>" and flag: li
'添加option到指定位置(按value排序) dim valindex valindex=-1 for i=0 to selcom.length-1 if selcom.Options(i).value >selallcomoption.value then valindex=i exit for end if next dim oOption set oOption= document.CreateElement("OPTION") oOption.text = selal