asp如何替换网页的内容啊 各位大神

偶滴神啊 2017-04-09 11:40:25
che.asp源文件如下
<!--#include file="inc/Conn.asp"-->

<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
<meta name="format-detection" content="telephone=no">
<title>xxxxxx</title>



<style>
.iframediv
{
position: absolute;
top: 45px;
left: 0;
}
.scan
{
background: url(img/loading.gif) no-repeat center 25%;
background-size: 120px 120px;
}
.ui-icon-close-page
{
position: absolute;
right: 7px;
top: 0;
}
</style>
<script src="http://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>

<script src="./play/swiper-3.3.1.min.js"></script>

<script type="text/javascript">
$(function(){
$('#rad label').click(function(){
$(this).siblings().removeClass('checked');
$(this).addClass('checked');
});
});

function gopay(paytype){

var pid=$('input[name=pid]:checked').val();

location.href="do.asp?action="+paytype+"&product_id="+pid+"";
}

var isweixin = false;
var paystate=0;



var swiper = new Swiper('.swiper-container', {
slidesPerView:7,
direction: 'vertical',
speed: 3000,
autoplay: 1,
loop: true,
loopedSlides: 100,
noSwiping: true,
noSwipingClass: 'stop-swiping',
spaceBetween: 1
});
</script>

<script src="./play/common.min.js"></script>

</span>

</body></html>




请教如何通过asp替换 掉 <title>xxxxxx</title> 和 <script src="http://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>


asp代码写到conn.asp里面就能直接替换网页 ?
...全文
301 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
hefeng_aspnet 2017-08-30
  • 打赏
  • 举报
回复
取title的:<title>[\s\S]*</title> 去除script代码: Function ClearJSCode(originCode) Dim reg set reg = New RegExp reg.Pattern = "<SCRIPT[^<]*</SCRIPT>" reg.IgnoreCase = True reg.Global = True clearJSCode = reg.Replace(originCode, "") End Function
从此不换网名 2017-04-10
  • 打赏
  • 举报
回复
asp还有人在用啊哈哈
  • 打赏
  • 举报
回复
xmlHttp随便你插
偶滴神啊 2017-04-10
  • 打赏
  • 举报
回复
引用 1楼showbo 的回复:
要用xmlHttp加载你这个页面获取html后来替换在输出,直接页面上是替换不了的,你能修改这个页面不直接设置title的内容和删除不就好了
那可以实现差一个自定义js在网页中间吗
  • 打赏
  • 举报
回复
要用xmlHttp加载你这个页面获取html后来替换在输出,直接页面上是替换不了的,你能修改这个页面不直接设置title的内容和删除不就好了

28,404

社区成员

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

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