- 浏览: 80630 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
LinApex:
yangshangchuan 写道我们研究new一个Objec ...
再次陷入迷茫 -
yangshangchuan:
我们研究new一个Object对象占多少内存可能没什么实际意义 ...
再次陷入迷茫
function killErrors() {
return true;
}
window.onerror = killErrors;
function visible_click() {
if (td1.className == "") {
td1.className = "tddisp";
}
else {
td1.className = "";
}
}
function useronline() {
mytop = screen.availHeight - 500;
myleft = 0;
window.open("main.do?action=User_online", "online", "height=370,width=170,status=0,toolbar=no,menubar=no,location=no,top=" + mytop + ",left=" + myleft + ",resizable=yes");
}
function openpwd() {
mytop = screen.availHeight - 500;
myleft = 250;
window.open("main.do?acrion=Update_pwd", "plugin", "height=250,width=350,status=0,toolbar=no,menubar=no,location=no,scrollbars=yes,top=" + mytop + ",left=" + myleft + ",resizable=no");
}
function userall() {
mytop = screen.availHeight - 500;
myleft = 250;
window.open("main.do?action=Update_Per", "online", "height=350,width=630,status=0,toolbar=no,menubar=no,location=no,top=" + mytop + ",left=" + myleft + ",resizable=no");
}
function usertx() {
mytop = screen.availHeight - 500;
myleft = 250;
window.open("main.do?action=Updatetx", "plugin", "height=300,width=400,status=0,toolbar=no,menubar=no,location=no,top=" + mytop + ",left=" + myleft + ",resizable=yes");
}
function send_request(url) {
http_request = false;
if (window.XMLHttpRequest)//Mozilla 浏览器
{
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType)//设置MiME类别
{
http_request.overrideMimeType("text/xml");
}
}
else if (window.ActiveXObject)// IE浏览器
{
try {
http_request = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e) {
try {
http_request = new ActivexObject("Microsoft.XMLHTTP");
}
catch (e)
{ }
}
}
if (!http_request)// 异常,创建对象实例失败
{
content.innerHTML = "不能创建XMLHttpRequest对象实例";
//window.alert("不能创建XMLHttpRequest对象实例");
return false;
}
//指定服务器返回信息时处理程序
http_request.onreadystatechange = processRequest;
// 确定发送请求的方式和URL以及是否同步执行下段代码
http_request.open("GET", url, true);
http_request.send(null);
}
function processRequest() {
if (http_request.readyState == 4) {
if (http_request.status == 200) {
//content.innerHTML=http_request.responseText;
if (http_request.responseText == 'notuser') {
alert('登陆超时'); window.parent.location = 'login.do?action=Login'
}
}
else {
//window.parent.location = 'default.aspx'
window.parent.location = 'login.do?action=Login'
content.innerHTML = "您所请求的页面有异常。请重新登陆再试";
}
}
}
window.setInterval("send_request('main.do?action=User_online_update&tmp='+Math.random())", 300000);
function showCover() {
//遮罩宽
var sw = document.body.scrollWidth;
//遮罩高
var sh = document.body.scrollHeight;
if (document.getElementById('AlexCoverV1_0')) {
DispalySelect(0);
document.getElementById('AlexCoverV1_0').style.display = 'block';
}
else {
DispalySelect(0);
var div = document.createElement("div");
div.id = "AlexCoverV1_0";
div.style.position = "absolute";
div.style.top = "0px";
div.style.left = "0px";
div.style.height = sh + "px";
div.style.width = sw + "px";
div.style.background = "#ffffff";
div.style.filter = "alpha(opacity=20)";
document.body.appendChild(div);
}
}
//显示和隐藏select控件
function DispalySelect(val) {
var dispalyType;
var arrdispalyType = ["hidden", "visible"];
var arrObjSelect = document.getElementsByTagName("select");
for (i = 0; i < arrObjSelect.length; i++) {
arrObjSelect[i].style.visibility = arrdispalyType[val];
}
}
function UploadComplete() {
showCover();
//控件宽
var aw = 300;
//控件高
var ah = 80;
//计算控件水平位置
var al = (screen.width - aw) / 2;
//计算控件垂直位置
var at = (screen.height - ah) / 5;
//内容管理
var title = '';
var icon = 'indi.gif';
var cardID = '0';
//输出提示框
var div = document.createElement("div");
div.id = "UploadChoose";
div.innerHTML = '\
<div style="background-color:#FFFFFF;position:absolute;top:' + at + 'px;left:' + al + 'px;width:' + aw + 'px;height:' + ah + 'px;border:2px solid #000000;text-align:center">\
<div style="clear:both;background-color:#0099AA;line-height:25px;font-weight:bold;color:#FFFFFF;font-size:12px;padding-left:10px">' + title + '</div>\
<div style="padding-top:30px;">\
<div style="float:left;width:20px;padding-left:40px"><img src="resources/images/' + icon + '" alert"Cardo" /></div>\
<div style="float:left;width:180px;margin-top:13px;padding-left:0px"><b>菜单加载中,请等待...</b></div>\
<div style="clear:both;text-align:center;margin-top:10px;padding-bottom:10px">\
</div>\
</div>\
</div>';
document.body.appendChild(div);
}
function closeAlert(alertid) {
document.getElementById(alertid).outerHTML = '';
closeCover();
}
function closeCover() {
if (document.getElementById('AlexCoverV1_0')) {
document.getElementById('AlexCoverV1_0').style.display = 'none';
DispalySelect(1);
}
}
//弹出信息框
function showwin(url) {
mytop = 100;
myleft = 250;
window.open(url, "online", "height=550,width=820,status=0,toolbar=no,menubar=no,location=no,top=" + mytop + ",left=" + myleft + ",resizable=no");
}
return true;
}
window.onerror = killErrors;
function visible_click() {
if (td1.className == "") {
td1.className = "tddisp";
}
else {
td1.className = "";
}
}
function useronline() {
mytop = screen.availHeight - 500;
myleft = 0;
window.open("main.do?action=User_online", "online", "height=370,width=170,status=0,toolbar=no,menubar=no,location=no,top=" + mytop + ",left=" + myleft + ",resizable=yes");
}
function openpwd() {
mytop = screen.availHeight - 500;
myleft = 250;
window.open("main.do?acrion=Update_pwd", "plugin", "height=250,width=350,status=0,toolbar=no,menubar=no,location=no,scrollbars=yes,top=" + mytop + ",left=" + myleft + ",resizable=no");
}
function userall() {
mytop = screen.availHeight - 500;
myleft = 250;
window.open("main.do?action=Update_Per", "online", "height=350,width=630,status=0,toolbar=no,menubar=no,location=no,top=" + mytop + ",left=" + myleft + ",resizable=no");
}
function usertx() {
mytop = screen.availHeight - 500;
myleft = 250;
window.open("main.do?action=Updatetx", "plugin", "height=300,width=400,status=0,toolbar=no,menubar=no,location=no,top=" + mytop + ",left=" + myleft + ",resizable=yes");
}
function send_request(url) {
http_request = false;
if (window.XMLHttpRequest)//Mozilla 浏览器
{
http_request = new XMLHttpRequest();
if (http_request.overrideMimeType)//设置MiME类别
{
http_request.overrideMimeType("text/xml");
}
}
else if (window.ActiveXObject)// IE浏览器
{
try {
http_request = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e) {
try {
http_request = new ActivexObject("Microsoft.XMLHTTP");
}
catch (e)
{ }
}
}
if (!http_request)// 异常,创建对象实例失败
{
content.innerHTML = "不能创建XMLHttpRequest对象实例";
//window.alert("不能创建XMLHttpRequest对象实例");
return false;
}
//指定服务器返回信息时处理程序
http_request.onreadystatechange = processRequest;
// 确定发送请求的方式和URL以及是否同步执行下段代码
http_request.open("GET", url, true);
http_request.send(null);
}
function processRequest() {
if (http_request.readyState == 4) {
if (http_request.status == 200) {
//content.innerHTML=http_request.responseText;
if (http_request.responseText == 'notuser') {
alert('登陆超时'); window.parent.location = 'login.do?action=Login'
}
}
else {
//window.parent.location = 'default.aspx'
window.parent.location = 'login.do?action=Login'
content.innerHTML = "您所请求的页面有异常。请重新登陆再试";
}
}
}
window.setInterval("send_request('main.do?action=User_online_update&tmp='+Math.random())", 300000);
function showCover() {
//遮罩宽
var sw = document.body.scrollWidth;
//遮罩高
var sh = document.body.scrollHeight;
if (document.getElementById('AlexCoverV1_0')) {
DispalySelect(0);
document.getElementById('AlexCoverV1_0').style.display = 'block';
}
else {
DispalySelect(0);
var div = document.createElement("div");
div.id = "AlexCoverV1_0";
div.style.position = "absolute";
div.style.top = "0px";
div.style.left = "0px";
div.style.height = sh + "px";
div.style.width = sw + "px";
div.style.background = "#ffffff";
div.style.filter = "alpha(opacity=20)";
document.body.appendChild(div);
}
}
//显示和隐藏select控件
function DispalySelect(val) {
var dispalyType;
var arrdispalyType = ["hidden", "visible"];
var arrObjSelect = document.getElementsByTagName("select");
for (i = 0; i < arrObjSelect.length; i++) {
arrObjSelect[i].style.visibility = arrdispalyType[val];
}
}
function UploadComplete() {
showCover();
//控件宽
var aw = 300;
//控件高
var ah = 80;
//计算控件水平位置
var al = (screen.width - aw) / 2;
//计算控件垂直位置
var at = (screen.height - ah) / 5;
//内容管理
var title = '';
var icon = 'indi.gif';
var cardID = '0';
//输出提示框
var div = document.createElement("div");
div.id = "UploadChoose";
div.innerHTML = '\
<div style="background-color:#FFFFFF;position:absolute;top:' + at + 'px;left:' + al + 'px;width:' + aw + 'px;height:' + ah + 'px;border:2px solid #000000;text-align:center">\
<div style="clear:both;background-color:#0099AA;line-height:25px;font-weight:bold;color:#FFFFFF;font-size:12px;padding-left:10px">' + title + '</div>\
<div style="padding-top:30px;">\
<div style="float:left;width:20px;padding-left:40px"><img src="resources/images/' + icon + '" alert"Cardo" /></div>\
<div style="float:left;width:180px;margin-top:13px;padding-left:0px"><b>菜单加载中,请等待...</b></div>\
<div style="clear:both;text-align:center;margin-top:10px;padding-bottom:10px">\
</div>\
</div>\
</div>';
document.body.appendChild(div);
}
function closeAlert(alertid) {
document.getElementById(alertid).outerHTML = '';
closeCover();
}
function closeCover() {
if (document.getElementById('AlexCoverV1_0')) {
document.getElementById('AlexCoverV1_0').style.display = 'none';
DispalySelect(1);
}
}
//弹出信息框
function showwin(url) {
mytop = 100;
myleft = 250;
window.open(url, "online", "height=550,width=820,status=0,toolbar=no,menubar=no,location=no,top=" + mytop + ",left=" + myleft + ",resizable=no");
}
发表评论
-
js加载问题
2014-07-21 14:46 589今天碰到一个js加载的问题,需要等页面上的图片加载完成后对图片 ... -
js中闭包,原型,构造函数解析。
2014-06-26 11:29 1260测试代码 var person = (function(){ ... -
jQuery load 问题
2013-09-27 12:58 570假如有两个页面A,B;A页面有一个标签绑定的test事件,B页 ... -
js知识
2013-05-17 22:03 742jQuery取下拉框的值:jQuery("#id&q ... -
jQuery的.bind()、.live()和.delegate()之间区别
2013-05-10 16:30 622http://kb.cnblogs.com/page/9446 ... -
ext gridPanel 带参数分页
2012-09-04 17:10 2227在使用ext自带的分页时,如果不按照前台选择的参数进行分页查询 ... -
extjs(10)
2011-10-10 09:02 0title : "渠道信息", ... -
extjs(9)
2011-10-10 09:01 0{id:"Button1", ... -
extjs(8)
2011-10-10 09:00 0{ id:"searc ... -
extjs(7)
2011-10-10 09:00 0{ id : "GridPane ... -
extjs(6)
2011-10-10 08:59 0Ext.onReady(function() { Ext. ... -
extjs(5)
2011-10-10 08:58 0buttons : [ { xtype : " ... -
extjs(4)
2011-10-10 08:57 0{xtype:"tbseparator"} ... -
extjs(3)
2011-10-10 08:57 0Ext.onReady(function() { v ... -
extjs(2)
2011-10-10 08:54 0var store = new Ext.data.JsonSt ... -
extjs(1)
2011-10-10 08:54 0<%@ page language="java ... -
common.js(3)
2011-10-10 08:51 0function tpcheck() { var a=0 ... -
common.js(1)
2011-10-10 08:50 0function killErrors() { return ... -
empply.js
2011-10-10 08:50 0function GetStr() { docume ... -
grid.js
2011-10-10 08:49 0function fun(Url) { var a = ...
相关推荐
ECharts-gl.js 和 echarts-gl.main.js 是 ECharts 的扩展包,专门为三维可视化设计,将 ECharts 的能力扩展到了三维空间。 在 ECharts 的基础上,echarts-gl.js 和 echarts-gl.main.js 添加了对三维可视化的支持,...
1.main.js /* 页面数据缓存 */ var _CACHE_OBJS = {}; function _init_cache(comp, key, cache) { var obj = cache[key]; if (obj !== undefined) { comp[key] = obj; } var deep = typeof comp[key] === '...
axios 用于web的请求文件
main.js自己用
AUTHORS,devcpp的运行必须文件之一,有了这个软件写c语言编程很方便很方便,有什么错误都会显示出来
本篇将重点解析标题中的"jquery-1.4.2.main.js",探讨其在实际应用中的主要功能,以及如何在JSP中实现拍照功能。 jQuery 1.4.2 是jQuery库的一个重要版本,虽然现在已经有更新的版本,但这个版本仍具有一定的稳定性...
main.js的源文件
Electron的main.js(或者在某些情况下可能是main.ts)是Electron应用程序的入口点。它是创建Electron窗口,设置主进程和创建渲染进程的主要位置。 以下是main.js或类似文件的一些主要功能: 创建窗口: Electron...
本篇将深入探讨"sein.js"和"main.js"这两个用于3D模型展示的JavaScript插件。 首先,"sein.js"是一个专门为3D模型展示设计的JavaScript库。它提供了一套完整的解决方案,帮助开发者在Web环境中轻松地加载、渲染和...
"respond.main.js"可能是一个用于处理响应式布局的JavaScript库,它可能利用了JIT编译来优化代码执行。 在JavaScript环境中,编译过程分为两个主要步骤:解析和执行。解析阶段,源代码被转化为抽象语法树(AST),...
进行移动前端开发的插件,可以让代码更简便,方便开发
JavaScript应用实例-main.js
669280979372788main.js
JavaScript应用实例-a5main.js
.arch05-main.js
Main.js
首先,main.js是整个Vue项目的入口文件。它的主要任务是创建Vue实例并引入所需的插件或组件。在main.js中,通常会包含以下关键步骤: 1. 导入Vue构造函数和VueRouter(用于页面导航)。 2. 创建VueRouter实例并定义...