if(window.screen.width==800)
{
document.wite('<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
WIDTH = "'+window.screen.width+'" HEIGHT = "'+ window.screen.height +'" NAME = "TestApplet" ALIGN = "center" VSPACE = "0" HSPACE = "0"')
}
else
{
document.wite('<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
WIDTH = "'+xxxx+'" HEIGHT = "'+ xxxx +'" NAME = "TestApplet" ALIGN = "center" VSPACE = "0" HSPACE = "0"')
}
................

解决方案 »

  1.   

    <body>
    <script>
    if(window.screen.width>1024)
    {
    document.write('<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH = "980" HEIGHT = "590" NAME = "TestApplet" ALIGN = "center" VSPACE = "0" HSPACE = "0" codebase="http://198.1.1.48:7001/products/plugin/1.4.0/j2re-1_4_0-win-install.exe#Version=1,4,0,0">
    ')
    }
    else
    {
    document.write('<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH = "'+window.screen.width+'" HEIGHT = "'+window.screen.height+'" NAME = "TestApplet" ALIGN = "center" VSPACE = "0" HSPACE = "0" codebase="http://198.1.1.48:7001/products/plugin/1.4.0/j2re-1_4_0-win-install.exe#Version=1,4,0,0">
    ')
    }
    </script>
    <PARAM NAME = CODE VALUE = "webchart.WebChart.class" >
    <PARAM NAME = CODEBASE VALUE = "http://198.1.1.48:7001/" >
    <PARAM NAME = NAME VALUE = "TestApplet" >
    <PARAM NAME = ARCHIVE VALUE = "WebChartV2.jar" >
    <PARAM NAME = dataFilePath VALUE = "chartData/" >
    <PARAM NAME = protocol VALUE = "http" >
    <PARAM NAME = host VALUE = "198.1.1.48" >
    <PARAM NAME = port VALUE = "7001" >
    <PARAM NAME="type" VALUE="application/x-java-applet;version=1.1">
    ..................