正则提取 input 中的 value 值

qq_16421073 2017-03-04 09:55:31
Function RegExpTest(patrn, strng)
Dim regEx, Match, Matches ' 建立变量。
Set regEx = New RegExp ' 建立正则表达式。
regEx.Pattern = patrn ' 设置模式。
regEx.IgnoreCase = True ' 设置是否区分字符大小写。
regEx.Global = True ' 设置全局可用性。
Set Matches = regEx.Execute(strng) ' 执行搜索。
For Each Match In Matches ' 遍历匹配集合。
'RetStr = RetStr & "Match found at position "
'RetStr = RetStr & Match.FirstIndex & ". Match Value is '"
RetStr = RetStr & Match.Value
Next
RegExpTest = RetStr
End Function



<input type="text" name="carNo" id="carNo" maxlength="30"
value="SLX5104" title="" readonly="readonly"
class='input12' />

请问怎么写可以提取到 SLX5104
...全文
429 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
浪子回头8 2017-03-08
  • 打赏
  • 举报
回复
carNo=trim(request("carNo"))

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧