日期:2014-05-16  浏览次数:20354 次

javascript问题,求教告诉
图片上传错误提示:
Microsoft JScript 运行时错误: DOM Exception: INVALID_CHARACTER_ERR (5)
错误代码地址:
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