您的位置:首页 > Web前端 > JavaScript

javascript 常用代码大全 1

2006-02-20 15:58 519 查看
//打开模式对话框
function doSelectUser(txtId)
{

strFeatures="dialogWidth=500px;dialogHeight=360px;center=yes;middle=yes ;help=no;status=no;scroll=no";
var url,strReturn;

url="selUser.aspx";

strReturn=window.showModalDialog(url,'',strFeatures);

}

//返回模式对话框的值
function okbtn_onclick()
{
var commstr='';

window.returnValue=commstr;

window.close() ;
}
全屏幕打开 IE 窗口
var winWidth=screen.availWidth ;
var winHeight=screen.availHeight-20;
window.open("main.aspx","surveyWindow","toolbar=no,width="+ winWidth +",height="+ winHeight +",top=0,left=0,scrollbars=yes,resizable=yes,center:yes,statusbars=yes");
break
//脚本中中使用xml
function initialize() {
var xmlDoc
var xslDoc

xmlDoc = new ActiveXObject('Microsoft.XMLDOM')
xmlDoc.async = false;

xslDoc = new ActiveXObject('Microsoft.XMLDOM')
xslDoc.async = false;

xmlDoc.load("tree.xml")
xslDoc.load("tree.xsl")

folderTree.innerHTML = xmlDoc.documentElement.transformNode(xslDoc)
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: