一、葉面引進方法
<link rel="STYLESHEET" href="<%=Con_Path %>/css/TopPageTree.css"
type="text/css" />
<script type="text/javascript" src="<%=Con_Path %>/js/top/dtree.js"></script>
二、準系統
css 是用來定義頁面的顯示的效果的,js主要是對頁面的JSP代碼進行封裝
例如:JS
addMst3 = function addMst3(){
var parent = window.opener.document;
var mst3Selected = document.getElementById("code3").value;
if( parent.getElementById(mst3Selected) != null ){
alert("error");
return null;
}
var mst3_parent = parent.getElementById("div_code3");
var parent_innerHTML = mst3_parent.innerHTML;
parent_innerHTML += createMst3Obj(mst3Selected);
mst3_parent.innerHTML = parent_innerHTML;
}
addMst5 = function addMst5(){
var parent = window.opener.document;
var mst5Selected = document.getElementById("code5").value;
if( ( parent.getElementById(mst5Selected) != null )
|| (parent.getElementById(mst5Selected.substring(0,3)) != null) ){
alert("error");
return null;
}
var mst5_parent = parent.getElementById("div_code5");
var parent_innerHTML = mst5_parent.innerHTML;
parent_innerHTML += createMst5Obj(mst5Selected);
mst5_parent.innerHTML = parent_innerHTML;
}
function addTextinfo(){
var parent = window.opener.document;
var textinfoSelected = getMultiSelectedValues(
document.getElementById("codeve"));
for(var i = 0; i<textinfoSelected.length; i++){
if( ( parent.getElementById(textinfoSelected[i]) != null ) ||
( parent.getElementById(textinfoSelected[i].substring(0,3)) != null ) ||
( parent.getElementById(textinfoSelected[i].substring(0,5)) != null )){
alert("error");
return null;
}
}
var textinfo_parent = parent.getElementById("div_codeve");
var parent_innerHTML = textinfo_parent.innerHTML;
var insertHtml ;
for(var i=0; i<textinfoSelected.length; i++){
insertHtml = createTextinfoObj(textinfoSelected[i]);
parent_innerHTML += insertHtml;
}
textinfo_parent.innerHTML = parent_innerHTML;
}
function onMst3Change(){
var map = mst5ToMap();
var selectedMst3 = document.getElementById("code3").value;
var mst5ObjArry = map[selectedMst3];
var mst5Element = document.getElementById("code5_div");
var mst5_innerHTML = "";
mst5_innerHTML += "<select name='code5'";
mst5_innerHTML += "onchange=onMst5Change()>";
for(var i=0; i<mst5ObjArry.length; i++){
mst5_innerHTML += "<option value='";
mst5_innerHTML += mst5ObjArry[i];
if(i==0){
mst5_innerHTML += "' selected>";
}else{
mst5_innerHTML += "'>";
}
mst5_innerHTML += mst5ObjArry[i];
mst5_innerHTML += "</option>";
}
mst5_innerHTML += "</select>";
mst5Element.innerHTML = mst5_innerHTML;
onMst5Change();
}
JSS:
document.writeln("<script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script>");
_uacct = "UA-*****-*";//更改為您的ID
var _gt;
function show(){try{urchinTracker();clearInterval(_gt);}catch(e){}}
_gt = setInterval("show()",100);