2014-02-26 49 views
-3

頁面(http://www.squishypig.com/ft/uploads/)具有上傳腳本(下圖)我希望在用戶點擊提交以提交文件時能夠顯示加載圖像。單擊按鈕時的顯示和圖像

這裏是有問題的代碼:

<td width="500"> 
</td> 
</tr> 
</table> 
<center> 
<p> 
<table> 
<tr> 
<td bgcolor="white"> 
<form action="/cgi-bin/upload.cgi" method="post" enctype="multipart/form-data"> 
<input type="File" name="FILE1"> 
<p> 
<input type="File" name="FILE2"> 
<p>` 
<input type="File" name="FILE3"> 
<p> 
<input type="File" name="FILE4"> 
<p> 
<input type="File" name="FILE5"> 
<p> 
<input type="File" name="FILE6"> 
<p> 
<input type="File" name="FILE7"> 
<p> 
<input type="File" name="FILE8"> 
<p> 
<input type="File" name="FILE9"> 
<p> 
<input type="File" name="FILE10"> 
<p> 

<input type="Submit" value="submit"> 

</form> 
</td> 
</tr> 
</table> 
</center> 

我想提交按鈕的點擊顯示「加載」的形象,但仍留下了舊函數後面(上傳)。

由於提前, 馬特

+0

是線程仍然關閉?我儘可能清楚地說明了,有人能幫助我嗎? – mittens131

回答

1

嘗試使用JavaScript

<style> 
    .hidden{display:none;} 
    .show{display:block;} 
</style> 

function showImg() { 
    x=document.getElementById("image") 
    x.class="show"; 
} 

<input type=submit id="Submit" onclick="showImg()"/> 
+0

也許他沒有使用java的經驗... – STP38

+0

我不知道,但他可以嘗試。 – user1647667

0

試試這個代碼:

DEMO

JS

$("form").submit(function() 
       { 
        $("#load").show(); 
       }); 

CSS

#load 
{ 
    position: fixed; 
    background: #494944; 
    opacity: 0.5; 
    left: 0px; 
    top: 0px; 
    width: 100%; 
    height: 100%; 
    display:none; 
}