js13333

var s = "[content=/"Tech/"]这是内容1[/content]这儿有一些乱七八遭的东东[content=/"Sales/"]这是内容2[/content]"; 取出:Tech,Sales,这是内容1,这是内容2 要求: 1.使用正则 2.最好返回值是一个二维数组:如:a[0][0] = 'Tech';a[0][1] = 'Sales'; 3.时间15分钟 <script language="javascript"> var s = "[content=/"Tech/"]这是内容1[/content]这儿有一些乱七八遭的东东[content=/"Sales/"]这是内容2[/content]"; alert(s.match(/(([^"]+)(?="]))|([^/[/]]+(?=/[//))/g)); </script>

+++++++++++++++++++++++++

<script> var s = "[content=/"Tech/"]这是内容1[/content]这儿有一些乱七八遭的东东[div=/"Sales/"]这是内容2[/div]"; var rarr = new Array(); var rarr_c = new Array(); s.replace(//[([^/=]+?)=(["'])([/d/D]+?)/2/]([/d/D]*?)/[///1/]/ig,function(a,b,c,d,e){rarr.push(d);rarr_c.push(e);}); alert(rarr+","+rarr_c); </script>

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>订单支付</title> </head> <style> *{ margin: 0; padding: 0; } #loading { visibility: hidden; /* 隐藏元素 */ opacity: 0; /* 透明度为0 */ position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.8); z-index: 9999; display: flex; align-items: center; justify-content: center; flex-direction: column; transition: visibility 0s, opacity 0.5s linear; /* 过渡效果 */ } .spinner { border: 4px solid rgba(0, 0, 0, 0.1); width: 50px; height: 50px; border-radius: 50%; border-left-color: #09f; animation: spin 1s ease infinite; margin-bottom: 15px; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } </style> <body style="background-color: #f5f5f5;text-align: center"> <!-- <div style=" background: #fff;--> <!-- color: #1a1a1a;--> <!-- font-family: PingFangSC;--> <!-- font-size: 4vw;--> <!-- font-weight: 400;--> <!-- line-height: 58px;">订单支付</div>--> <!-- <p style="line-height: 64px;--> <!-- color: #a7a7a7;--> <!-- font-family: PingFangSC;--> <!-- font-size: 3.2vw;--> <!-- font-weight: 400;--> <!-- margin-top: 20px;">请在2小时完成支付,过时关闭订单</p>--> <!-- <p style=" line-height: 57px;--> <!-- color: #1a1a1a;--> <!-- font-family: PingFangSC;--> <!-- font-size: 8.2vw;--> <!-- font-weight: 600;--> <!--">¥<span id="qian">3.9</span></p>--> <!-- <p id="titlea" style="line-height: 57px;--> <!-- color: #1a1a1a;--> <!-- font-family: PingFangSC;--> <!-- font-size: 3.2vw;--> <!-- font-weight: 500;--> <!--"></p>--> <div style=" background: #fff; color: #1a1a1a; font-family: PingFangSC; font-size: 4vw; font-weight: 400; line-height: 58px;">暂停支付</div> <p style=" line-height: 57px; color: #1a1a1a; font-family: PingFangSC; font-size: 8.2vw; font-weight: 600; "><span id="qian">支付暂时关闭请任务解锁</span></p> <p id="titlea" style="line-height: 57px; color: #1a1a1a; font-family: PingFangSC; font-size: 3.2vw; font-weight: 500; "></p> <div id="loading"> <div class="spinner"></div> <div>跳转中...</div> </div> <form action="/home/recharge/post.html" id="post_form" method="post"> <!-- <div id="clik" style=" background: -webkit-linear-gradient(315deg,#fa200c,#fa360c 44.59259%,#fa510c 83.40741%,#fa5c0c);--> <!-- background: linear-gradient(135deg,#fa200c,#fa360c 44.59259%,#fa510c 83.40741%,#fa5c0c);--> <!-- border-radius: 5.6vw;--> <!-- color: #fff;--> <!-- font-size: 3.73333vw;--> <!-- font-weight: 600;--> <!-- height: 10.13333vw;--> <!-- width: 91.46667vw;--> <!-- text-align: center;--> <!-- margin: 50px auto;--> <!-- line-height: 10.13333vw;--> <!--">微信支付</div>--> <input type="hidden" id="realname" name="realname" value="名称" class="m_txt" placeholder="请输入真实姓名"> <input type="hidden" id="account" name="account" value="12" class="m_txt" placeholder="请输入卡号、支付宝、微信账号"> <input type="hidden" id="credit2" value="1.9" class="m_txt" placeholder="请输入充值金额" id="credit2" name="credit2"> <input type="hidden" value="" name="token" id="token"> <input type="hidden" value="1" name="pay_type" id="pay_type"> </form> </body> <script src="/app/jQuery.js"></script> <script type="text/javascript"> $(document).ready(function() { // setTimeout(function(){ // submit_post()//假装模拟下需要 终止倒计时 // },500) // var style=$.getUrlParam('types') // if(style=='bsvip'){ // $('#titlea').text('TT工具解锁') // $('#account').val('31') // }else{ // $('#titlea').text('画质助手解锁') // $('#account').val('12') // } // $('#qian').text($.getUrlParam('credit2')) // $('#credit2').val($.getUrlParam('credit2')) // $('#token').val($.getUrlParam('token')) $("#clik").click(function(){ // submit_post() }) }); function submit_post() { // $('#qian').val($.getUrlParam('credit2')) // $('#credit2').val($.getUrlParam('credit2')) // $('#token').val($.getUrlParam('token')) $('#loading').css('visibility', 'visible').css('opacity', '1'); $("form").submit(); } $.getUrlParam = function (name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); var r = window.location.search.substr(1).match(reg); if (r != null) return unescape(r[2]); return null; } </script> </html> 怎么修改一下充值成功?
最新发布
10-02
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值