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

📄 shkl_lenovo_swirl_yesky_hp.js

📁 VC++串口通讯编程事例,通过它可以了解在VC中如何进行串口通讯的
💻 JS
📖 第 1 页 / 共 2 页
字号:
function shCollapse()
{
	shElTop=0;
	document.body.style.marginTop=5;
}

function shMutexUnlock()
{
	if(window.shMutexUnlocked) return;

	if(window.shUseMutex && window.mutex_unlock)
	{
		window.mutex_unlock();
	}

	window.shMutexUnlocked=1;
}

// no borrar esta funcion
function shScroll(){}

function shDoScrollFix(){ setInterval(shDoScroll,100); }
function shDoScroll()
{
	if(!window.shMutexFree) return;

	var x=0,y=0;
	if(shPosMethod==2)
		x=shGetX(shObjeto),y=shGetY(shObjeto);

	// el top cambia si esta expandido o contraido
	if(window.SHBIG)
	{
		if(window.shScrolls)
		{
			var newTop = document[dtdFix].scrollTop + document[dtdFix].clientHeight - flashHeight - ((document[dtdFix].clientHeight - flashHeight)/2);
			var scrollLimitY=shTop+y;
			sh_all_anim.style.posTop = (newTop>=scrollLimitY)? newTop : scrollLimitY;
		}
		else
		{
			sh_all_anim.style.posTop = shTop+y;
		}
	}
	else
	{
		if(shIconScrolls)
		{
			sh_all_anim.style.posTop = document[dtdFix].scrollTop + document[dtdFix].clientHeight - flashHeight - 10 + shIconYoffset;
		}
		else
		{
			sh_all_anim.style.posTop = y+shTop+shIconYoffset;
		}
	}

	// el left solamente depende del tipo de posicion (centrado/anclado)

	if(shPosMethod==1)
		var newLeft=(((document[dtdFix].clientWidth - flashWidth)/2) + shLeft);
	else
		var newLeft=x+shLeft;

	if(!window.SHBIG)
	{
		if(window.shIconFixedLeft!==false) newLeft=shIconFixedLeft;
		else newLeft+=shIconXoffset;
	}

	sh_all_anim.style.left = newLeft;
}

function shDontScroll(){ /*window.status='nada: ' + Math.random()*1000;*/ }

function f800x600()
{
	if(shObjeto)
	{
		shHideIt();
		window.setTimeout("sh_all_anim.style.display = 'inline'",1500);
		window.setTimeout("sh_all_anim.style.visibility = 'visible'",1500);
		sh_all_anim.style.width=flashWidth-1;
		setTimeout("sh_all_anim.style.width=flashWidth;",100);
	}
	else
	{
		window.setTimeout("f800x600()",100);	
	}
}
function getObj(theTags,theWidth,theHeight,thePos){theTags=theTags.toUpperCase().split(',');var laImageCount=0,losObjetos,theImage=false;for (var shA=0;shA<theTags.length;shA++){losObjetos=theTags[shA]=="IMG"?shFrameObject.document.images:shFrameObject.document.getElementsByTagName?shFrameObject.document.getElementsByTagName(theTags[shA]):shFrameObject.document.all.tags?shFrameObject.document.all.tags(theTags[shA]):false;if (losObjetos){for (var shI=0;shI<losObjetos.length;shI++){if((losObjetos[shI].width==theWidth&&losObjetos[shI].height==theHeight||losObjetos[shI].offsetWidth==theWidth&&losObjetos[shI].offsetHeight==theHeight)&&++laImageCount==thePos){theImage=losObjetos[shI];break;}} laImageCount=0;if(theImage)break;}} return theImage;}

function shPlayShoshkele()
{
	if(sh_mode=="SOHU" && !window.shFree)
	{
		setTimeout("shPlayShoshkele()",100);
		return;
	}

	if(shPosMethod==2)
	{
		shObjeto=getObj(getObjParams[0],getObjParams[1],getObjParams[2],getObjParams[3]);
	}

	// Si el creativo empieza colapsado no debe usar las funciones de locking
	if(window["creative"+ sh_current_creative +"_starts_collapsed"]==1)
	{
		window.SHBIG=0;
		window.shUseMutex=0;
	}
	else
	{
		window.SHBIG=1;
		window.shUseMutex=(window.mutex_lock)?1:0;
	}

	window.shMutexFree=(!shUseMutex || mutex_lock()==0)?1:0;
	
	if(shMutexFree && (shPosMethod!=2 || shObjeto)) 
	{
		shFrameObject.onscroll=shDoScroll;
		shFrameObject.onresize=shDoScroll;
		shView();
		shDoScroll();
		shDoScrollFix();
		setTimeout("f800x600()", 100);
	}
	else
	{
		setTimeout("shPlayShoshkele()",100);
	}
}

function shReposition()
{
}

function CALLUV(o)
{
	if(sh_mode!="SOHU") return;
	shFramePointer.shFree=1;
	window.sh_lock_object = o;
}

function shAdUnlock()
{
	if(sh_mode!="SOHU") return;
	if(window.shAdUnlocked) return;
	else window.shAdUnlocked=1;

	sh_lock_object.s=2;
}

function overwriteEvents()
{
	function contains(str, containsStr){ var str = str + ""; return ( str.indexOf(containsStr) != -1 )? true : false; }

	if( (shFramePointer.shPosType == "center" || shFramePointer.shPosType == "docked") && !contains(window.onresize, "UV.OR") )
	{
		window.siteResize = onresize;
		shFrameObject.onresize = shFramePointer.shReposition;
	}

	setTimeout("overwriteEvents();",200);
}
function shGetY(obj){var shY=0;while(obj){shY+=obj.offsetTop;obj=obj.offsetParent;} return shY;}
function shGetX(obj){var shX=0;while(obj){shX+=obj.offsetLeft;obj=obj.offsetParent;} return shX;}

function shCreate()
{
	if (shType!="XXXXX")
	{
		if((shFrameObject.document.readyState=="complete"||shFrameObject.document.readyState=="interactive")&&!shFrameObject.shFramePointer)
		{
			window.scrollMax = document.body.scrollHeight;
			shFrameObject.shFrameObject=window;shFrameObject.shFramePointer=window;
			if(window.theIndex)
			{
				var shScriptString=window.shReposition?'window.siteResize=window.onresize;window.onresize=shFramePointer.shReposition;':'';
				shScriptString+=window.shScroll?'window.onscroll=shFramePointer.shScroll;':'';
				shScriptString+=overwriteEvents+'overwriteEvents();';
				
				shFrameObject.document.body.insertAdjacentHTML('afterBegin',shFlashObj()+'<SPAN STYLE="display:none">OLAF<SCRIPT DEFER>'+shScriptString+'<\/SCRIPT><\/SPAN>');
			}
			else
			{
				if(window.shScroll) window.onscroll = shScroll;
				if(window.shReposition) window.onresize = shReposition;
				//eval(shScriptString);
			}
			
			window.setTimeout("window.sh_all_anim=shFrameObject.document.all.sh_all_anim;",100);
			window.setTimeout("shCommand();shPlayShoshkele();",500);
		}
		else
		{
			setTimeout('shCreate()',100);
		}
	}
}
if(window.theIndex) window.attachEvent("onload", shCreate);
else shCreate();

} /* </timeline> */

document.write('<div id="oClientCaps" style="position:absolute;top:-100px;behavior:url(#default#clientCaps)"></div>');
function conType(){return document.getElementById("oClientCaps").connectionType;}
if (1==shRnd2()) {
	var myFlash=shFlash<6?'NO':shFlash;
	shReport('FLASH_'+myFlash);
	shReport('SR_'+screen.width+'X'+screen.height);
	shReport(conType());
} 
/* </js> */

⌨️ 快捷键说明

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