html展示pdf以base64格式
代码
...
basedata=result["data"];
var newbasedata="data:application/pdf;base64,"+basedata;
var dom=‘‘;
//dom+=‘<object id="" src="‘+basedata+‘" type="application/pdf" width="600" height="600">‘;
dom+=‘<embed id="mainpdf" src="‘+newbasedata+‘" type="application/pdf" width="600" height="600">‘;
//dom+=‘</object>‘;
$("#sss").append(dom);
结果
base64没有被识别,而被认为是一串地址