<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根本不显示图象。。????????
<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根本不显示图象。。????????
<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>
<input type="button" onclick="btt();">
换成你的
<input type =file onpropertychange="btt()">
即可.
请指教。。
<input type =file onchange="document.all.aa.src=this.value" >
去掉你的javaScript函数
document.getElementById("aa").src="C:\\004.jpg";
与
document.all.iframe1.src="file:///C:\\expand-.gif";
的差异。