<script type="text/javascript">
function load(filename,photoname,type){

if (type == 'certificate')
   {
form1.IMAGE_NAME.value=photoname;
var src="../../oa/photo/certificate/"+photoname;
path="oa/photo/certificate/"+photoname;
document.getElementById("photo").innerHTML="<a href=\""+src+"\" target=\"_blank\"><img src=\""+src+"\" width=\"300\" height=\"300\" onload=\"javascript:DrawImage(this,300,300);\" border=\"0\" /></a>";
   }

}
</script>上面的js中如果photoname是中文名,就不能正常显示图片。请问在js中src应该怎么转码?