//全部粘贴出来吧!!!
我试了一下没有问题
第一段或者是第二段都可以调用start函数,但是2段放在一起也可以同时执行不了
是不是你start函数放的位置不对??
<script>
function start(a,b,c,d)
{
alert("a="+a+" b="+b+" c="+c+" d="+d);}
</script>
<td width="30" height="91">
 <img id="container" src="../Resource/ml2.bmp" width="30" height="15"/>
<script language="javascript">
start(0.2,0.05,0.1,5000);
</script></td>
 
<td width="30" height="91">
 <img id="container" src="../Resource/ml2.bmp" width="30" height="15"/>
<script language="javascript">
start(0.05,0.1,0.2,3000);
</script>
 </td>

解决方案 »

  1.   

    <script language="javascript">
    function start(a, b, c, d) {
      if (a>0.1 && b<0.06 && c>0.01 && d<5000) {
            images=['../Resource/ml2.bmp','../Resource/ml4.bmp','../Resource/ml3.gif','../Resource/ml5.bmp']
            circle();
            return;
      }<!--水分 挥发分 硫分 热值均超标-->
      
      if (a>0.1 && b<0.06 && c>0.01 && d>5000) {
            images=['../Resource/ml2.bmp','../Resource/ml4.bmp','../Resource/ml3.gif']
            circle();
            return;
      }<!--水分 挥发分 硫分 超标-->
        
      if (a>0.1 && b<0.06 && c<0.01 && d<5000) {
            images=['../Resource/ml2.bmp','../Resource/ml4.bmp', '../Resource/ml5.bmp']
            circle();
            return;
      }<!--水分 挥发分 热值 超标-->
      
      if (a>0.1 && b>0.06 && c>0.01 && d<5000) {
            images=['../Resource/ml2.bmp','../Resource/ml3.gif', '../Resource/ml5.bmp']
            circle();
    return;
      }<!--水分  硫分 热值超标-->
      
      if (a<0.1 && b<0.06 && c>0.01 && d<5000) {
            images=['../Resource/ml4.bmp','../Resource/ml3.gif', '../Resource/ml5.bmp']
            circle();
    return;
      }<!--挥发分 硫分 热值 超标-->
      
       if (a>0.1 && b<0.06 && c<0.01 && d>5000) {
            images=['../Resource/ml2.bmp', '../Resource/ml4.bmp']
            circle();
    return;
      }<!--水分 挥发分  超标-->
      
       if (a>0.1 && b>0.06 && c>0.01 && d>5000) {
            images=['../Resource/ml2.bmp','../Resource/ml3.gif']
            circle();
    return;
      }<!--水分 硫分  超标-->
      
       if (a>0.1 && b>0.06 && c<0.01 && d<5000) {
            images=['../Resource/ml2.bmp', '../Resource/ml5.bmp']
            circle();
    return;
      }<!--水分  热值 超标-->
      
       if (a<0.1 && b<0.06 && c>0.01 && d>5000) {
            images=['../Resource/ml4.bmp','../Resource/ml3.gif']
            circle();
    return;
      }<!-- 挥发分 硫分  超标-->
      
       if (a<0.1 && b>0.06 && c<0.01 && d<5000) {
            images=['../Resource/ml4.bmp','../Resource/ml5.bmp']
            circle();
    return;
      }<!--挥发分  热值 超标-->
      
       if (a<0.1 && b<0.06 && c>0.01 && d<5000) {
            images=['../Resource/ml3.gif', '../Resource/ml5.bmp']
            circle();
    return;
      }<!--硫分 热值 超标-->
    }var counter=0;
    var images=[];
    var container=[];
    function circle() {
      container[].src=images[counter];
      counter++;
      
      if (counter >= images.length) {
        counter=0;
      }
      
      setTimeout("circle();", 2000);
    }function loadRes() {
    var loader = new Image();

    loader.src="../Resource/ml2.bmp";
    loader.src="../Resource/ml4.bmp";
    loader.src="../Resource/ml5.bmp";
    loader.src='../Resource/ml3.gif'

    <!--info.innerText="Loaded.";-->


    }
    </script>
    <body onload="loadRes();">
    <img id="container[0]" src="../Resource/ml2.bmp" width="30" height="15"/>
    <script language="javascript">
    start(0.2,0.05,0.1,5000);
    </script><img id="container[1]" src="../Resource/ml2.bmp" width="30" height="15"/>
    <script language="javascript">
    start(0.05,0.1,0.2,3000);
    </script>