Help.Web/editor/scripts/image_background.htm

(开头部分) 6KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="style/editor.css" rel="stylesheet" type="text/css">
<script>
	var sLangDir=dialogArguments[1].oUtil.langDir;
	document.write("<scr"+"ipt src='language/"+sLangDir+"/image_background.js'></scr"+"ipt>");
</script>
<script>writeTitle()</script>
<script>
function bodyOnLoad()
	{	
	var oCell = dialogArguments[0];
	
	sImgUrl=oCell.style.backgroundImage;
	if(sImgUrl=="none")sImgUrl="";
	else sImgUrl=sImgUrl.substring(4,sImgUrl.length-1);
	inpCell_BgImgURL.value=sImgUrl;
	
	inpCell_BgImgRepeat.value=oCell.style.backgroundRepeat;

	if(oCell.style.backgroundPositionX=="left"||oCell.style.backgroundPositionX=="center"||oCell.style.backgroundPositionX=="right")
		{
		inpCell_BgImgHAlign[0].checked=true;
		inpCell_BgImgHAlignPos.value=oCell.style.backgroundPositionX;
		}
	else
		{
		var sPosX=oCell.style.backgroundPositionX;
		if(sPosX.substring(sPosX.length-1)=="%")
			{
			sPosXVal=sPosX.substring(0,sPosX.length-1);
			if(sPosXVal*1!=0)
				{
				inpCell_BgImgHAlign[1].checked=true;
				inpCell_BgImgHAlignVal.value=sPosXVal;
				inpCell_BgImgHAlignMeasure.value="%";				
				}
			}
		else if(sPosX.substring(sPosX.length-2)=="px")
			{
			sPosXVal=sPosX.substring(0,sPosX.length-2);
			if(sPosXVal*1!=0)
				{
				inpCell_BgImgHAlign[1].checked=true;
				inpCell_BgImgHAlignVal.value=sPosXVal;
				inpCell_BgImgHAlignMeasure.value="px";
				}
			}
		}

	if(oCell.style.backgroundPositionY=="top"||oCell.style.backgroundPositionY=="middle"||oCell.style.backgroundPositionY=="bottom")
		{
		inpCell_BgImgVAlign[0].checked=true;
		inpCell_BgImgVAlignPos.value=oCell.style.backgroundPositionY;
		}
	else
		{
		var sPosY=oCell.style.backgroundPositionY;
		
后面还有 135 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。