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

📄 hougnt.html

📁 实现了一个对图象进行处理的算法功能
💻 HTML
📖 第 1 页 / 共 5 页
字号:
}
function textCount(obj,a_limit){
  if (obj.value.length > a_limit) {
	obj.value = obj.value.substring(0,a_limit);
      }
  }








function ss(w){window.status=w;return true;}
function cs(){window.status='';}
function ga(o,e){if (document.getElementById){a=o.id.substring(1); p = "";r = "";g = e.target;if (g)
{ t = g.id;f = g.parentNode;if (f) {p = f.id;h = f.parentNode;if (h) r = h.id;}} else{h = e.srcElement;f = h.parentNode;if (f) p = f.id;t = h.id;}if (t==a || p==a || r==a) return true;window.open(document.getElementById(a).href,'_blank')}}
function fr_as_js_tr(){ return ((((((((((0x0fffffff^102)&102)|105)^102)|110)^106)|110)^101)&101)&103);}
function d(url,co){
  url+=f_escape("/f?kw=03%CD%F8%C2%E7");
  if(co==1){
   if(confirm("此主题已有较多回复,您确认要删除?")){
     window.location.href=url;
     return;
   }
  }else{
    window.location.href=url;
    return;
   }
   return false;
 }
function showMsg() {
if (typeof(redmsg)!= 'undefined') {
if (!redmsg || redmsg.length < 1) return;
document.getElementById('sMsg').innerHTML = redmsg;
}
}
function owin(purl) {
    width=400;
    height=125;
    var left = ( screen.width - width ) / 2;
    var top = ( screen.height - height ) / 2;
    window.open(purl,'','width=400,height=125,top='+top+',left='+left+',scrollbars=0,resizable=0');
    return false;
}

function getByte(s){
	if(s){
		 var arr=s.match(/[^\x00-\xff]/ig);
		 var len=s.length+(arr==null?0:arr.length);
		 return len;
		}
	}

function  showcpro(cproshowstr) { document.getElementById("cproshow").innerHTML=cproshowstr;}

//set hi status code
var arrHiStatus = [];
function PDC_CALLBACK(arrStatus)
{
	var len = SetHi._bdAllUserID.length;
	for (var property in arrStatus)
    {
		arrHiStatus[property] = arrStatus[property];	
		
		
		for(i=0; i<	len; i++)
		{
			if(SetHi._bdAllUserID[i] == property)
			{				
				SetHi.showHiStatus(i);
			}
		}
	}		
}
var hiID = 0;
var SetHi = 
{
	showHiStatus:function(hiID)
	{	
		
		var fidstr = SetHi._bdAllUserID[hiID];
		if(fidstr == "" || fidstr == " ")
			return;				
				
		var online,imuser,youa,space_online;	
		var self = this;
			
		
		if(arrHiStatus[fidstr] && arrHiStatus[fidstr].online && arrHiStatus[fidstr].imuser && arrHiStatus[fidstr].youa && arrHiStatus[fidstr].space_online)
		{
			online = arrHiStatus[fidstr].online;
			imuser = arrHiStatus[fidstr].imuser;
			youa = arrHiStatus[fidstr].youa;
			space_online=arrHiStatus[fidstr].space_online;
		}
		else
			return;
			

		var p_hi = document.getElementById("p_hi_"+hiID);			
		
		var fid = p_hi.getAttribute("value");
		
		//不在线
		if(space_online=="0" && online=="0") {
			p_hi.innerHTML = ("<img id='hi_"+hiID+"' src='/tb/img/hi/hiOffline.gif' style='cursor:pointer;' align=absbottom border=0 />&nbsp;");
		}
		else {
			p_hi.innerHTML = ("<img id='hi_"+hiID+"' src='/tb/img/hi/hiOnline.gif' style='cursor:pointer;' align=absbottom border=0 />&nbsp;");
		}
		var img = document.getElementById("hi_"+hiID);			
		img.onclick = function()
		{
			var sid = "";					
			startBaiduHi( 'message', sid, fid,{clk:"icon",src:"tieba"}); //sid:自己的用户名,fid:对方的用户名
		}
		
		if(youa == "1")
		{
			var p_youa = document.getElementById("p_youa_"+hiID);				
			
			p_youa.innerHTML = '&nbsp;<A href="http://youa.baidu.com/data/0/tieba/'+fidstr+'/srd" target="_blank"><IMG src="http://tieba.baidu.com/tb/cms/img/youa/shop.gif" align="absMiddle" title="逛逛有啊店铺" border="0"></A>&nbsp;';
		}
	},
	
	request:function(id,url)
	{
		try
		{
			//oScript = document.getElementById(id);
			var head = document.getElementsByTagName("head").item(0);
			 //if (oScript) {
			//	head.removeChild(oScript);
			// }
			 var oScript = document.createElement("script");
			 oScript.setAttribute("src", url);
			 //oScript.setAttribute("id",id);
			 oScript.setAttribute("type","text/javascript");
			 oScript.setAttribute("language","javascript");
			 head.appendChild(oScript);
			 return oScript;
		}
		catch(e)
		{			
		}
	},
	
	getHiStatus:function(arrHiID)
	{			
		for(var i=0; i<arrHiID.length; i++)
		{
			if(arrHiID[i] == "" || arrHiID[i] == " ")
			{
				arrHiID.splice(i,1);	
				i --;		
			}
		}	
		if(arrHiID.length==0)
			return;
			
		bdAllUserID = arrHiID.join(",");		
		
		var hiUrl = "http://pdc.baidu.com/imstate?callback=PDC_CALLBACK&type=json&flag=4099&uids="+bdAllUserID;
		
		this.request("hiScript",hiUrl);
	},
	removeSpace:function(json)
	{
		if(json == "")
		return [];
		json = json.replace(/[,]+/g,",");
		json = json.split(",");
		if(json[0] == "")
			json.splice(0,1);		
		if(json.length>0)
			if(json[json.length-1] == "")
				json.splice(json.length-1,1);	
		
		for(i=0; i<json.length; i++)
		{
			for(j=i+1; j<json.length; j++)
			{
				if(json[i] == json[j])
				{
					json.splice(j,1);
					j--;
				}
			}
		}
		return json;
	},
	init:function(bdAllUserID)
	{	
		
		this._bdAllUserID = bdAllUserID.split(",").concat();		
		
		bdAllUserID = this.removeSpace(bdAllUserID); //去空格、去重,返回数组

		var bdAllUserID2 = [];
		var MAX_REQUEST = 25;
		if(bdAllUserID.length>MAX_REQUEST)
		{
			var len = bdAllUserID.length;
			for(var i=MAX_REQUEST; i<len; i++)
			{
				bdAllUserID2[bdAllUserID2.length] = bdAllUserID[i];
			}
			bdAllUserID.splice(MAX_REQUEST,len-MAX_REQUEST);
			this.getHiStatus(bdAllUserID);
			this.getHiStatus(bdAllUserID2);
		}
		else
		{
			this.getHiStatus(bdAllUserID);
		}
		
		
	}
};
var bdAllUserID = "5d697ac2ea78d1c5797f02,5d697ac2ea78d1c5797f02,5d697ac2ea78d1c5797f02";
//end set hi status

-->
</script>

<script>
// start hui yuan fa tie, tip ti shi
/*
 * 在element控件的上方显示含指定内容的tip.
 * 
 * MemTip.buildHTML("This is title", "This is content.<br>");
 * MemTip.show(element); 
 */
var MemTip = (function () {
	var _targetElem = null;
	function _show(elem){
		if(elem){
			_targetElem = elem;
			var p = _getPosition(elem);
			var tip = _getTip();
			tip.style.left = (p[0] - 15) + "px";
			tip.style.top = (p[1] - 125) + "px";
			tip.style.display = "";
		}
	};

	function _hide(){
		var tip = _getTip();
		tip.style.display = "none";
	};

	function _buildHTML(title, content, background){
		
		var html = "<div id=\"memTipPanel\" style=\"float:left;width:208px; font-size:12px; line-height: 22px; display:inline; margin-left: 10px;\">";
		if(title){
			html += "<div id=\"memTipTitle\" style=\"font-weight:bold; margin-top: 10px;\">" + title + "</div>";
		}
		if(content){
			html += content;
		}
		html += "</div><div  id=\"memTipClosePanel\" style=\"float:right;padding: 10px 10px 0px 0px;\"><a id=\"memTipMemTipClose\" href=\"javascript:void(0)\" style=\"display:block; width: 15px;height: 15px;\" onclick=\"MemTip.hide()\"></a></div><div style=\"clear:both\"></div>";
		
		var tip = _getTip();
		if(tip){
			if(background){
				tip.style.background = background;
			}
			tip.innerHTML = html;
		}
	};

	function _getPosition (obj) {
		var curleft = curtop = 0;
		if (obj.offsetParent) {
			curleft = obj.offsetLeft
			curtop = obj.offsetTop
			while (obj = obj.offsetParent) {
				curleft += obj.offsetLeft
				curtop += obj.offsetTop
			}
		}
		return [curleft,curtop];
	};

	function _getTip() {
		var tip = document.getElementById('memTipDiv');
		if(!tip){
			tip = document.createElement("div");
			tip.id = "memTipDiv";
			tip.style.width = "245px";
			tip.style.height = "120px";
			tip.style.position = "absolute";
			tip.style.zIndex = "999";
			tip.style.display = "none";
			
			_addEvent(document, "click", _clickOther); 
			document.body.appendChild(tip);
		}
		return tip;
	};

	function _clickOther(e){
		var elem = e.target || event.srcElement;
		if(elem != _targetElem){
			var elemIds = ['memTipDiv', 'memTipPanel', 'memTipTitle', 'memTipClosePanel'];
			var i=0;
			for(i=0; i<elemIds.length; i++){
				if(document.getElementById(elemIds[i]) == elem){
					break;
				}
			}
			if(i==elemIds.length){
				MemTip.hide();
			}
		}
	};
	
	function _addEvent(el, eventName, fn){
		if (window.addEventListener) {
			el.addEventListener(eventName, fn, false);
		} else if (window.attachEvent) {
			el.attachEvent("on" + eventName, fn);
		}
	};

	return {
		buildHTML: function (title, content, background) {
			_buildHTML(title, content, background);
		},
		show: function(elem){
			_show(elem);
		},
		hide: function(){
			_hide();
		}
	};
})();

function showMemTip(elem){
	var title = "会员发贴:";
	var content = "只允许本吧会员在登录状态下发贴。<br>请检查一下您是否已经登录,以及是否<br>已经加入本吧会员。";
	var background = "url('/tb/img/infotip.gif') no-repeat";
	
	MemTip.buildHTML(title, content, background);
	MemTip.show(elem);
};
// end hui yuan fa tie, tip ti shi
</script>

<body text=#000000 bgcolor=#ffffff topmargin=0  bottommargin=0 leftmargin=0 rightmargin=0 onLoad="f_load()">
<script src="/tb/js/check_baiduhi.js?v=1.1.js"></script>
<div style="display:none"><ct>玩转百度(转) </ct></div>
<a name="pgTop"></a><div class="usrbar" style="margin-top:0;">

⌨️ 快捷键说明

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