加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

VBS如何引入双引号输出

(2019-01-11 10:36:15)
分类: W~VBS
chr(34)表示单引号(即chr(34)=" ),用引入变量的方式引入单引号

如:

Const ForReading = 1, ForWriting = 2, ForAppending = 8
  Dim fso, f 
  Set fso = CreateObject("Scripting.FileSystemObject")
  Set f = fso.OpenTextFile("E:\VBS\qj\bzn_200people_config.txt",8,true)
  For i = 1 to 2000
  para = "{"&chr(34)&"birthDate"&chr(34)&":"&chr(34)&"19620607"&chr(34)&","&chr(34)&"certNo"&chr(34)&":"&chr(34)&"432503198709282805"&chr(34)&","&chr(34)&"certType"&chr(34)&":"&chr(34)&"ID_CARD"&chr(34)&","&chr(34)&"contactNo"&chr(34)&":"&chr(34)&"13111111111"&chr(34)&","&chr(34)&"jobCode"&chr(34)&":"&chr(34)&"OCC_CD_00021"&chr(34)&","&chr(34)&"monthlySalary"&chr(34)&":2100,"&chr(34)&"name"&chr(34)&":"&chr(34)&"两千人"&i&""&chr(34)&","&chr(34)&"physicalStatus"&chr(34)&":"&chr(34)&"PHY_STA_0002"&chr(34)&","&chr(34)&"jobCompany"&chr(34)&":"&chr(34)&"所属公司2018102313123701"&chr(34)&","&chr(34)&"salaryCurrency"&chr(34)&":"&chr(34)&"CNY"&chr(34)&","&chr(34)&"sex"&chr(34)&":"&chr(34)&"F"&chr(34)&"},"
  f.Write  para&vbCr
  next
 
  f.Close

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有