// 文件名 :common.js
// 常用 Javascript 函数的声明
// 作者 : 刘海龙
// to:xiaoleilong@mail.biti.edu.cn">xiaoleilong@mail.biti.edu.cn
// 2003年8月1日
//初始化 需要显示的内容
function init()
{
var coll = document.all.tags("DIV");
var i;
for (i=0;i<3;i++ )
coll[i].style.display = "none";
coll[0].innerHTML = do_trans("index.htm.files/data/record.xml","index.htm.files/styles/normal.xsl");//显示视图
coll[1].innerHTML = get_edit_view();
coll[2].innerHTML = get_set_view();
}
/** 函数 do_trans((strXmlPath , strXslPath)
* 参数:分别指定 xml 文件 和 xsl 文件的路径
* 功能:使用 xsl 对 xml 进行转换
* 返回:转换得到的字符串
*/
function do_trans(strXmlPath , strXslPath)
{
// Load XML
var xml = new ActiveXobject("Microsoft.XMLdom")
xml.async = false
xml.load(strXmlPath)
// Load the XSL
var xsl = new ActiveXObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load(strXslPath)
// Transform
return xml.transformNode(xsl);
}
/** 函数 disp_spec_sect(section)
* 参数:指定将切换到的页面 , 其中 : disp -- 显示简历的页面 ; edit -- 编辑简历的页面 ; set -- 进行基本设置的页面 。
* 功能:根据 section 参数的取值, 切换显示到指定的页面 。
* 返回:无返回值
*/
function disp_spec_sect(section)
{
var coll = document.all.tags("DIV");
if (coll != null)
{
for (i=0; i
}
document.getElementById(section+"").style.display = "block";
}
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/10748419/viewspace-961548/ ,如需转载,请注明出处,否则将追究法律责任。