1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- function v(id) {
- return document.getElementById(id);
- }
- // 显示
- function showErrorMsg(id) {
- var t = v(id);
- t.style.width = document.body.clientWidth + "px";
- t.style.height = document.body.clientHeight + "px";
- window.onresize = function() {
- t.style.width = document.body.clientWidth + "px";
- t.style.height = document.body.clientHeight + "px";
- }
- v(id).style.display = "";
- }
- // 关闭
- function closeWin(id) {
- v(id).style.display = "none";
- }
- //复制
- function copy(id) {
- v(id).select();
- var msg=v(id).value;
- window.clipboardData.setData('text', msg);
- alert('错误信息已成功复制到剪切板!');
- }
- //保存
- function save(id) {
- var msg=v(id).value;
- var fso = new ActiveXObject("Scripting.FileSystemObject");
- var tf = fso.createtextfile("c:\\系统异常信息.txt",true);
- // 填写数据,并增加换行符
- tf.WriteLine("系统异常信息:") ;
- tf.WriteLine("----------------------------------------------") ;
- // 增加2个空行
- tf.WriteBlankLines(2) ;
- // 填写一行,不带换行符
- tf.Write (msg);
- // 关闭文件
- tf.Close();
-
- alert('文件路径:C:\\系统异常信息.txt');
- }
- //返回
- function toBack(){
- window.history.go(-1);
- }
- //显示管理员信息
- function showAdminInfo(){
- showErrorMsg('adminInfo');
- }
- // -------------------------------------------------------------------------------
- function moveEvent(e, id) {
- var isIE = (document.all) ? true : false;
- // navigator.userAgent.toLowerCase().indexOf("msie") != -1;
- // var event=window.event||event;
- drag = true;
- xx = isIE ? event.x : e.pageX;
- yy = isIE ? event.y : e.pageY;
- L = v(id).offsetLeft;
- T = v(id).offsetTop;
- document.onmousemove = function(e) {
- if (drag) {
- x = isIE ? event.x : e.pageX;
- if (x < 0)
- x = 0;
- y = isIE ? event.y : e.pageY;
- if (y < 0)
- y = 0;
- v(id).style.left = L - xx + x;
- v(id).style.top = T - yy + y;
- }
- };
- document.onmouseup = function() {
- drag = false;
- };
- };
- // -------------------------------------------------------------------------------
- window.onscroll = function() {
- v("back_div").style.width = document.body.scrollWidth + "px";
- v("back_div").style.height = document.body.scrollHeight + "px";
- };
|