请问各位大哥师傅:
我想用变量控制以下语句中的width 
Response.Write("<img  width =100 src=""VoteResult.GIF"">")
假设变量是aaa aaa是一个integer型
应该如何写
十分感激!!!!

解决方案 »

  1.   

    int aaa = 100;
      Response.Write("<img  width ="+ aaa.ToString() +" src=""VoteResult.GIF"">")
      

  2.   

    上面没有写好
      int aaa = 100;
      Response.Write("<img  width ='"+ aaa.ToString() +"' src='VoteResult.GIF'>")
      

  3.   

    int aaa = 100;
    string str = "";
    str += @"<img  width ='";
    str += aaa.ToString() ;
    str += @"' src='VoteResult.GIF'>"Response.Write( str )
      

  4.   

    string variable = 100;
    Response.Write("<img id=\"test1\" width =\""+variable.ToString()+"\" src=""VoteResult.GIF"">")
    <script language="javascript">
    function test()
    {
       try{
       document.getElementById("test1").width = 100;
     }
       catch(e){
       //alert("Error");
     }
    }
    </script>