Uploaded file name is path via HTML and Javascript

I want to upload file by using HTML + javascript.

Although it works, uploaded file name is path name not the file name.

Here is my code to upload file...


<form id="upload_form" method='POST' enctype='multipart/form-data' action='' >
    file upload: <input type="file" id="file" name="file">
    <input type="submit" value="Submit" onclick="UploadFile()"/>


function UploadFile()
   document.getElementById("upload_form").action = document.getElementById("upload_form").action + _fileName; 

If I choose "C:\Users\Desktop\test5.txt"

The uploaded file name will be "C:UsersDesktoptest5.txt"

How can I change the file name to be "test5.txt" only


Just reference here there are some tips for u to follow


Need Your Help

How to apply line breaks in JLabels?

java swing user-interface jlabel

Please have a look at the following code

EF 4 Code First - Combine Views and Tables

entity-framework c#-4.0 views ef-code-first

I researched this question for days and cannot seem to find an option I feel good about; however, here is a link to a very similar question:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.