1.检查浏览器:
function SecurityTest()
{
var canxml,canscript,canactivex;
try{
var oXmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
canxml = true;
}
catch (e)
{
canxml = false;
}
try{
var oDate = new Date().toDateString();
canscript=true;
}
catch (e)
{
canscript = false;
}
try{
var fso=new ActiveXObject("Scripting.FileSystemObject");
canactivex= true;
}
catch(e)
{
canactivex = false;
}
if (canxml&&canscript&&canactivex)
return true;
else
return false;
}
function window.onload()
{
if (SecurityTest())
{
document.getElementById("LinkButton1").style.display = ''none'';
}else
{
& |