<head>
<script language="javascript">
  function btt()
  {
    document.all.iframe1.src="file:///C:\\expand-.gif";
   }
</script>
</head>
<body>
<iframe id =frame1 src=""></iframe>
<form>
<input type =file onpropertychange="btt()">
</form>
</body>以上是我写的代码,我的expand-.gif图象是动态的,是在通过fileload选择文件后自动生成的,请问为什么我的ifrmae根本不显示图象。。????????

解决方案 »

  1.   

    <head>
    <script language="javascript">
      function btt()
      {
        document.getElementById("aa").src="C:\\004.jpg";
        document.getElementById("xx").value="dddddddddddddddddddddd"
       }
    </script>
    </head>
    <form id="Form1" method="post">
    <iframe id="aa" width="600" height="400"></iframe><input type="button" onclick="btt();">
    <input id="xx" type="text">
    </form>
      

  2.   

    你只要将
    <input type="button" onclick="btt();">
    换成你的
    <input type =file onpropertychange="btt()">
    即可.
      

  3.   

    啊,看来代码是没有错的,但为什么iframe里面不显示我的图片呢,是ie设置的问题吗?
    请指教。。
      

  4.   

    把<input type =file onpropertychange="btt()">改为
    <input type =file onchange="document.all.aa.src=this.value" >
    去掉你的javaScript函数
      

  5.   

    注意
    document.getElementById("aa").src="C:\\004.jpg";

    document.all.iframe1.src="file:///C:\\expand-.gif";
    的差异。