I m试图制造一个jax文档上载模块。 请参看以下法典,
//create the form for uploading the file the ajax file
FileUploader.prototype.createForm = function() {
// create the new form
var form = document.createElement( form );
form.id = this.form_id;
form.action = this.url;
form.method = post ;
form.enctype = multipart/form-data ;
form.target = file_upload_iframe ;
// try to create a file type of input failed at [1]
/* var input_file = document.createElement( input );
input_file.type = file ;
input_file.name = this.name;
input_file.value = this.file; [1] */
// try to clone the input file but failed to insert it to the old form[2]
// or the new form [3] either
var input_file = document.getElementById( userfile );
var new_input_file = document.cloneNode(true);
// document.getElementById( file_upload ).appendChild(new_input_file); [2]
new_input_file.id = ;
form.appendChild(new_input_file); // [3]
document.body.appendChild(form);
return form;
};
为什么会发生 *** 我有安全错误:《安全错误守则》:“1000?
为什么我无法将新编的“投入——档案输入新制作的表格[3],甚至把新版的“投入——档案装入旧格式”(12)?
感谢。