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

📄 newtype.js

📁 该系统是jsp+mysql+javabean的大型购物和新闻系统。 修订了1.0版本的一些BUG. 在1.0版本的基础之上
💻 JS
字号:
<script language="javascript">
var arrayboardID=new Array();
var arrayboardName=new Array();
var arrayboardParentID=new Array();
<%
Vector type_vct = mangeclass.getAllType()
for(int i=0; i<type_vct.size(); i++)
{
    Vector atype_vct =(Vector)type_vct.get(i);
    %>
    arrayboardID[<%=i%>]=<%=atype_vct.get(0)%>; arrayboardName[<%=i%>]='<%=atype_vct.get(1)%>'; arrayboardParentID[<%=i%>]='<%=atype_vct.get(2)%>';
    <%
}
%>
function changeBoardParent()
{
/**
*@设置一级拦目
*/	   
	   setBoard(document.form1.new_type.value);
}
function setBoard(province)
{
	
/**
*@设置二级拦目
*/		
document.form1.new_sub_type.options.length=0;
var count=0;

if(province!="all"){
	for(var i=0; i<arrayboardParentID.length; ++i)
	{
	    if(arrayboardParentID[i]==province)
	    {
	         document.form1.new_sub_type.add(document.createElement('OPTION'));
	         document.form1.new_sub_type.options[count].text=arrayboardName[i];
	         document.form1.new_sub_type.options[count].value=arrayboardID[i];
	         count++;
	    }
	}
    }
else
   {
document.form1.new_sub_type.add(document.createElement('OPTION'));
document.form1.new_sub_type.options[count].text="不限";
document.form1.new_sub_type.options[count].value="all";
count++;   
   }      
}
//-->
</script>

⌨️ 快捷键说明

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