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

📄 common

📁 从网上收集的多个软件滤波算法文章,大概有10种.
💻
字号:
function notIn(val,obj){	var obj_size = obj.length;	for(i = 0; i < obj_size; i++)	{		if(obj[i].value == 0 || obj[i].value == val)return false;	}	return true;}function addTo(theList,theSelect){	var size1 = theList.length;	var i = 0;	i = theList.selectedIndex;	if (i < 0) return false;	if(notIn(theList[i].value,theSelect))	{		if(theList[i].value == 0)		{			theSelect.length = 1;			theSelect[theSelect.length - 1].text = theList[i].text;			theSelect[theSelect.length - 1].value = theList[i].value;		}		else		{			var size = theSelect.length;			if (theSelect.length >= 3)			{				alert("最多不能超过3个选项");				return false;			}			theSelect.length = size + 1;			theSelect[theSelect.length - 1].text=theList[i].text;			theSelect[theSelect.length - 1].value=theList[i].value;		}        return true;	}	/*	else	{		alert("不能重复添加");		return false;	}*/	return false;}function addToWithSubmit(theList,theSelect){	var success = addTo(theList,theSelect);	if (success == false) return false;	var selectName = theSelect.name;	var selectIndex = theList.selectedIndex;	var itemNames = document.getElementsByName(selectName + "Names");	var itemValues = document.getElementsByName(selectName + "Values");	var i;	// because addto is success, the length of theSelect is bigger than 0	if(theSelect[0].value == 0)	{		itemNames[0].value = theList[selectIndex].value;		itemValues[0].value = theList[selectIndex].text;		// clear the other values		for (i = 1; i < 3; i++)		{			itemNames[i].value = "";			itemValues[i].value = "";		}	}	else	{		// adjust the position of hidden value		for (i = 0; i < 3; i++)		{			if (itemNames[i].value == "") break;		}		itemNames[i].value = theList[selectIndex].value;		itemValues[i].value = theList[selectIndex].text;	}}function moveWithSubmit(theSelect){	theListId = theSelect.selectedIndex;	var selectName = theSelect.name;	remove(theSelect);	if (theListId >= 0) {		var itemNames = document.getElementsByName(selectName + "Names");		var itemValues = document.getElementsByName(selectName + "Values");		var i;		for (i = theListId + 1; i < 3; i++)		{			itemNames[i - 1].value = itemNames[i].value;			itemValues[i - 1].value = itemValues[i].value;		}		itemNames[i - 1].value = "";		itemValues[i - 1].value = "";	}}function remove(theSelect){	var theListId = theSelect.selectedIndex;	if (theListId < 0) return;	if(theListId >= 0)	{		theSelect.remove(theListId);	}	if (theListId < theSelect.length)	{		theSelect.selectedIndex = theListId;	}	else	if (theSelect.length > 0)	{		theSelect.selectedIndex = theSelect.length - 1;	}}function changeSubSelect(theParent,theSub,theData){	var theSelectedIndex = theParent.selectedIndex;	var staff = theData[theSelectedIndex];		len = staff.length / 2;	theSub.length = len;	for (var i = 0; i < len; i++)	{		theSub.options[i] = new Option(staff[2 * i],staff[2 * i + 1]);	}	theSub.selectedIndex = 0;}function selectValue(theObj,theSelectValue){    var len = theObj.length;    if (len == 0) return;	for (var i = 0; i < len; i++)	{		if (theObj.options[i].value == theSelectValue)       {           theObj.selectedIndex = i;           return;       }	}}function selectSingle(theObj){	if (theObj.checked == false) return;	var name = theObj.name;	var itemNames = document.getElementsByName(name);	var len = itemNames.length;	for (var i = 0; i < len; i++)	{		if (itemNames != itemNames[i])		{			itemNames[i].checked = false;		}	}	theObj.checked = true;}function popup(sUrl,sName,sFeatures){	window.open(sUrl,sName,sFeatures);}function changeSearchList(sUrl,radioButton,labelName,changeList){	var label = document.getElementById(labelName);	//var labels = document.getElementsByName(labelName);	//var label = labels[0];	if (radioButton.value == 'ARTICLE')	{		label.innerHTML = "文章分类:";	}	else	{		label.innerHTML = "论坛分类:";	}		//alert('changeList='+changeList);    document.getElementById("sub").src =        sUrl + "catType=" + radioButton.value + "&listName=" + changeList ;}/* * Create Date:2004-06-01 * Author: Jeff.Zhou * Reload the sublist data. */function updateList(changeList,values){		    var list = document.getElementById(changeList);		var len = list.length;	    for (var i = 1; i < len; i++)    {        list.remove(1);    }    nLen = values.length/2;    for (var i = 0; i < nLen; i++)    {        list.options[i+1] = new Option(values[2*i+1],values[2*i]);    }    list.selectedIndex = 0;}/* *Author Wulf.wu *check the selected checkbox list*/function hint(sform,obj){    var sel = false;    if(obj)    {        if(obj.length > 1)        {            for(var i=0; i<obj.length; i++)            {                if(obj[i].checked)                {                    sel = true;                    break;                }            }            if(sel)            {                if(confirm("确认要删除吗?"))                    sform.submit();            }            else                alert("请选择要删除的项!");        }        else        {            if(obj.checked)            {                if(confirm("确认要删除吗?"))                    sform.submit();            }            else                alert("请选择要删除的项!");        }    }    else        alert("请选择要删除的项!");}function checkForm(theForm){	var str = Trim(theForm.keyword.value);	if(str==""){		alert("请输入关键词");		theForm.keyword.focus();		return false;	}	return true;}	function LTrim(str){    var whitespace = new String(" \t\n\r");    var s = new String(str);    if (whitespace.indexOf(s.charAt(0)) != -1)    {        var j=0, i = s.length;        while (j < i && whitespace.indexOf(s.charAt(j)) != -1)        {            j++;        }        s = s.substring(j, i);    }    return s;}function RTrim(str){    var whitespace = new String(" \t\n\r");    var s = new String(str);    if (whitespace.indexOf(s.charAt(s.length-1)) != -1)    {        var i = s.length - 1;        while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1)        {            i--;        }        s = s.substring(0, i+1);    }    return s;}function Trim(str){    return RTrim(LTrim(str));}

⌨️ 快捷键说明

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