日期:2014-05-17 浏览次数:20982 次
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<title></title>
<!--deletebegin-->
<script src="../../../js/jquery-1.9.1.min.js" type="text/javascript"></script>
<!-- deleteend-->
<script src="../../../js/base.js" type="text/javascript"></script>
<script type="text/javascript">
function test() {
$('#divAn').animate({ right: "50%" });
}
function test1() {
$('#divAn').animate({ right: "50%" });
}
//deletebegin
function test2() {
$('#divAn').animate({ right: "50%" });
}
function test3() {
$('#divAn').animate({ right: "50%" });
}
//deleteend
</script>
</head>
<body>
<div id="divAn" style="width: 100px; height: 100px; background-color: Red; right: 20px;
position: absolute;">
</div>
<div>
1111111</div>
<div>
222222</div>
<div>
3333333</div>
<!--deletebegin-->
<div>
4444
<div>
55555</div>
</div>
<!--deleteend-->
<input id="Button1" type="button" value="button" onclick="test();" />
</body>
</html>
try:
Regex.Replace(html, @"(?<=<!--deletebegin-->).*(?=<!--deleteend-->)", "");
Regex.Replace(html, @"(?<=//deletebegin).*(?=//deleteend)", "");