⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 enlarge.js

📁 Enlarge java script is used to enlarge a picture in to the original size, and gives the flexibility
💻 JS
字号:
<script type='text/javascript'>

var message="";
///////////////////////////////////
function clickIE() 
{
	if (document.all)
	{
		(message);
		return false;
	}
}

function clickNS(e) 
{
	if(document.layers||(document.getElementById&&!document.all)) 
	{
		if (e.which==2||e.which==3) 
		{
			(message);
			return false;
		}
	}
}

if (document.layers) 
{
	document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;
}
else
{
	document.onmouseup=clickNS;document.oncontextmenu=clickIE;
}
document.oncontextmenu=new Function("return false")


function get(eid) 
{
var d = document;
var r = d.getElementById(eid);
return r;
}

function popImg(open, iref) 
{
	if (open) 
	{
		// top for popup image 10 pixels
		// below corresponding thumb

		var top = (10+iref.offsetHeight+iref.offsetTop) +'px';

		// left for popup image is aligned
		// with left of thumbnail

		var left = iref.offsetLeft + 'px';

		// use same source file for popup
		// as thumbnail

		var img = '<img src="' +iref.src + '" />';
		var d = document;
		
		// if popup hasn't yet been added,
		// create and append to body

		if (null == get('popImg')) 
		{
			var pop = d.createElement('DIV');
			pop.id = 'popImg';
			pop.style.position = 'absolute';
			d.body.appendChild(pop);
		}
		
		// get reference to popup image
		// container div
		
		var pop = get('popImg');
		
		// set image element into div

		pop.innerHTML = img;
	
		// position relative to thumbnail
	
		pop.style.top = top;
		pop.style.left = left;
		
		// show the div and its image
		
		pop.style.display = 'block';
	}
	else 
	{
		// since request was for close,
		// (open==false), hide the div -
		// don't destroy it, since it can
		// be recycled cheaper

		var pop = get('popImg');
		pop.style.display = 'none';
	}
}

</script>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -