var f = $(this).get(0 ). files[0];
var form = document.getElementById('myform');
var formData = new FormData(form);#. ', f);
var xhr = new XMLHttpRequest();
xhr.addEventListener("load",#pload ", uploadFailed, false);
xhr.open('POST', form.action);
xhr.send(formData);
#);
#函數uploadComplete(evt)
{
var data=evt.target.responseText
##}
函數uploadFailed()
{
alert("上傳失敗!請重試!");
}