1:后台调用

1 public void Test() 2 { 3 4 Response.Write(GetMsg(1)); 5 6 }
2:后台方法
我的js 目录

1 public string GetMsg(int type) 2 { 3 StringBuilder RtStr = new StringBuilder(); 4 if (type == 0)//文件丢失 5 { 6 RtStr.Append(@"<!DOCTYPE html> <html> <head> <meta charset='utf-8'> <title>文件有误</title> 7 8 <script src='../../js/jquery-3.1.0.min.js' charset ='UTF-8' ></script> 9 10 <script> 11 $(function() { 12 setInterval(function() { 13 window.history.go(-1); 14 }, 3000); 15 }); 16 17 </script> 18 </head> 19 20 <body> 21 <br/><br/><br/> <h1><div style='text-align:center; '>文件有误,请联系管理员。</div></h1> 22 23 24 25 26 </body> 27 28 </html>"); 29 30 } 31 else if (type == 1)//操作频繁 32 { 33 34 RtStr.Append(@"<!DOCTYPE html> 35 <html> 36 37 <head> 38 39 <meta charset='utf-8'> 40 41 <title>操作频繁</title> 42 43 <script src='../../js/jquery-3.1.0.min.js' charset ='UTF-8' ></script> 44 45 <script> 46 $(function() { 47 setInterval(function() { 48 window.history.go(-1); 49 }, 3000); 50 }); 51 52 </script> 53 </head> 54 55 <body> 56 <br/><br/><br/> <h1><div style='text-align:center; '>操作频繁请一分钟后再试。</div></h1> 57 58 59 60 61 </body> 62 63 </html> 64 65 "); 66 67 } 68 else//解密失败 69 { 70 71 RtStr.Append(@"<!DOCTYPE html> 72 <html> 73 74 <head> 75 76 <meta charset='utf-8'> 77 78 <title>解密失败</title> 79 80 <script src='../../js/jquery-3.1.0.min.js' charset ='UTF-8' ></script> 81 82 <script> 83 $(function() { 84 setInterval(function() { 85 window.location.href ='" + 86 SendEmail.WebsiteUrl + 87 @"' 88 }, 3000); 89 }); 90 91 </script> 92 </head> 93 94 <body> 95 <br/><br/><br/> <h1><div style='text-align:center; '>您的文件自己加了一遍密,解密失败,请联系管理员。</div></h1> 96 97 98 99 100 </body> 101 102 </html> 103 104 "); 105 106 } 107 return RtStr.ToString(); 108 }
3:引用的JS

/*! jQuery v3.1.0 | (c) jQuery Foundation | jquery.org/license */ !function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";var c=[],d=a.document,e=Object.getPrototypeOf,f=c.slice,g=c.concat,h=c.push,i=c.indexOf,j={},k=j.toString,l=j.hasOwnProperty,m=l.toString,n=m.call(Object),o={};function p(a,b){b=b||d;var c=b.createElement("script");c.text=a,b.head.appendChild(c).parentNode.removeChild(c)}var q="3.1.0",r=function(a,b){return new r.fn.init(a,b)},s=/^[suFEFFxA0]+|[suFEFFxA0]+$/g,t=/^-ms-/,u=/-([a-z])/g,v=function(a,b){return b.toUpperCase()};r.fn=r.prototype={jquery:q,constructor:r,length:0,toArray:function(){return f.call(this)},get:function(a){return null!=a?a<0?this[a+this.length]:this[a]:f.call(this)},pushStack:function(a){var b=r.merge(this.constructor(),a);return b.prevObject=this,b},each:function(a){return r.each(this,a)},map:function(a){return this.pushStack(r.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(f.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c<b?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:h,sort:c.sort,splice:c.splice},r.extend=r.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||r.isFunction(g)||(g={}),h===i&&(g=this,h--);h<i;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(r.isPlainObject(d)||(e=r.isArray(d)))?(e?(e=!1,f=c&&r.isArray(c)?c:[]):f=c&&r.isPlainObject(c)?c:{},g[b]=r.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},r.extend({expando:"jQuery"+(q+Math.random()).replace(/D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===r.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=r.type(a);return("number"===b||"string"===b)&&!isNaN(a-parseFloat(a))},isPlainObject:function(a){var b,c;return!(!a||"[object Object]"!==k.call(a))&&(!(b=e(a))||(c=l.call(b,"constructor")&&b.constructor,"function"==typeof c&&m.call(c)===n))},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?j[k.call(a)]||"object":typeof a},globalEval:function(a){p(a)},camelCase:function(a){return a.replace(t,"ms-").replace(u,v)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(w(a)){for(c=a.length;d<c;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(s,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(w(Object(a))?r.merge(c,"string"==typeof a?[a]:a):h.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:i.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;d<c;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;f<g;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,f=0,h=[];if(w(a))for(d=a.length;f<d;f++)e=b(a[f],f,c),null!=e&&h.push(e);else for(f in a)e=b(a[f],f,c),null!=e&&h.push(e);return g.apply([],h)},guid:1,proxy:function(a,b){var c,d,e;if("string"==typeof b&&(c=a[b],b=a,a=c),r.isFunction(a))return d=f.call(arguments,2),e=function(){return a.apply(b||this,d.concat(f.call(arguments)))},e.guid=a.guid=a.guid||r.guid++,e},now:Date.now,support:o}),"function"==typeof Symbol&&(r.fn[Symbol.iterator]=c[Symbol.iterator]),r.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){j["[object "+b+"]"]=b.toLowerCase()});function w(a){var b=!!a&&"length"in a&&a.length,c=r.type(a);return"function"!==c&&!r.isWindow(a)&&("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a)}var x=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C={}.hasOwnProperty,D=[],E=D.pop,F=D.push,G=D.push,H=D.slice,I=function(a,b){for(var c=0,d=a.length;c<d;c++)if(a[c]===b)return c;return-1},J="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",K="[\x20\t\r\n\f]",L="(?:\\.|[\w-]|[^ -\xa0])+",M="\["+K+"*("+L+")(?:"+K+"*([*^$|!~]?=)"+K+"*(?:'((?:\\.|[^\\'])*)'|"((?:\\.|[^\\"])*)"|("+L+"))|)"+K+"*\]",N=":("+L+")(?:\((('((?:\\.|[^\\'])*)'|"((?:\\.|[^\\"])*)")|((?:\\.|[^\\()[\]]|"+M+")*)|.*)\)|)",O=new RegExp(K+"+","g"),P=new RegExp("^"+K+"+|((?:^|[^\\])(?:\\.)*)"+K+"+$","g"),Q=new RegExp("^"+K+"*,"+K+"*"),R=new RegExp("^"+K+"*([>+~]|"+K+")"+K+"*"),S=new RegExp("="+K+"*([^\]'"]*?)"+K+"*\]","g"),T=new RegExp(N),U=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+N),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\("+K+"*(even|odd|(([+-]|)(\d*)n|)"+K+"*(?:([+-]|)"+K+"*(\d+)|))"+K+"*\)|)","i"),bool:new RegExp("^(?:"+J+")$","i"),needsContext:new RegExp("^"+K+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\("+K+"*((?:-\d)?\d*)"+K+"*\)|)(?=[^-]|$)","i")},W=/^(?:input|select|textarea|button)$/i,X=/^hd$/i,Y=/^[^{]+{s*[native w/,Z=/^(?:#([w-]+)|(w+)|.([w-]+))$/,$=/[+~]/,_=new RegExp("\\([\da-f]{1,6}"+K+"?|("+K+")|.)","ig"),aa=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ba=/([0-x1fx7f]|^-?d)|^-$|[^x80-uFFFFw-]/g,ca=function(a,b){return b?"