2011-03-02 83 views

回答

1

我試圖讓它在Chrome,但它會返回異常值可能是出於安全原因


//i have an input of file type with name image_file 
//<input type=​"file" name=​"image_file"/>​ 
var path = $('input[type=file][name=image_file]').val(); 
alert(path); 
/* 
i got "C:\fakepath\wattan-company-view.gif" 
but it is in E:\..., but IE i don't know its behavior especially its earlier versions 
*/ 

我想知道的是什麼將你需要的路徑????? 如果你想上傳與AJAX iframe post form jquery plugin其非常容易使用