日期:2014-05-16 浏览次数:20447 次
var io = document.createElement('<iframe id="' + frameId + '"	name="' + frameId + '" />');createUploadIframe: function(frameId, uri) {
		//create frame
		if(window.ActiveXObject) {
			var io = document.createElement('<iframe id="' + frameId + '"	name="' + frameId + '" />');
			if(typeof uri== 'boolean') {
				io.src = 'javascript:false';
			}
			else if(typeof uri== 'string') {
				io.src = uri;
			}
		} else {
			var io = document.createElement('iframe');
			io.id = frameId;
			io.name = frameId;
		}
		io.style.display = 'none';
		document.body.appendChild(io);
		return io;
	},//上传方法
function uploadFile(fileId) {
$("#uploading").ajaxStart(function () {
$(this).show();
}).ajaxComplete(function () {
$(this).hide();
});
$.ajaxFileUpload({
url: "/FileUpload/FileUpload?folderName=/UploadImages/BooKImages/",
secureuri: false,
fileElementId: fileId,
dataType: 'text',
success: function (data, status) {
if (data != "-1") {
$("#FILEPATH").val(data);
$("#ResultShow").html("上传成功!");
//$("#returnImg img").attr("src", data);
//$("#returnImg img").show();
$("#returnImg_show").attr("src", $("#FILEPATH").val());
// $("#returnImg_show").show();
// $("#regurnImg").html("<img id='returnImg_show'src='"+ data +"' alt='' style='display: none' />");
&nbs