上传图片兼容firefox
function HandleUploadPic(UploadPic) {
document.getElementById("txtPic").value=UploadPic;
oo("_myeditor_txtTeacherDesc").contentWindow.document.body.focus();
if (!isIE)
{
var obj = oo("_myeditor_txtTeacherDesc").contentWindow.getSelection().getRangeAt(0);
var imgElement = document.createElement("img"); imgElement.src = UploadPic;
obj.surroundContents(imgElement);
}
else {
var obj = oo("_myeditor_txtTeacherDesc").contentWindow.document.selection.createRange();
obj.pasteHTML('<img src="'+UploadPic+'" border=0 />');
}
}
function oo(ID){ return document.getElementById(ID); }