研究了一个下午,没有头绪,来论坛求助,老ID丢了!重新注册了一个!=。=!
我想用javascript正则提取asp代码中SQL行的表达式但是写来写去都不行,各位辛苦帮忙看看!
想提取引号中的SQL表达式
strSql="Select * from project354 where ID = "&Request("id")& and Name='111'"
- <htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html;charset=gb2312"/><title>无标题文档</title><script>functiongetSqlCode(){str11=document.all("_ASPeditor").value;/(.*)strSql=(.*)[^"]*$/gi.test(str11);ssss1=RegExp.$2;alert(ssss1);}</script></head><body><textareacols="50"rows="10"id="_ASPeditor"><%'Thefilenameofthistagistag_354_content.aspSubtag_354_content()setobjRs_tag_354_content=server.createobject("adodb.recordset")strSql="Select*fromproject354whereID="&Request("id")&""objRs_tag_354_content.openstrSql,conn,1,1EndSub%></textarea><inputname=""type="button"value="提取SQL"onclick="getSqlCode()"/></body></html>








发表评论
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。