中文转码unicode


js代码:

//拼接二维码链接,将中文进行转码.
function setErweima(){
	var applicantName = '${receiveApp.orgName}';
	applicantName = encodeURI(applicantName);
	
	var sjUrl = 'http://192.168.XXX.XXX:8080/zwdtSW/codePic/showQRCode.do?unicode=${receiveApp.hallNum}&applicant=' + applicantName + '&size=normal';
	var qxUrl = 'http://10.125.XXX.XXX:8080/zwdtSW/codePic/showQRCode.do?unicode=${receiveApp.hallNum}&applicant=' + applicantName + '&size=normal';
	var xzqhCode = '${receiveApp.xzqhCode}';
	if(xzqhCode == '310000'){
		$('#erweima').attr('src', sjUrl);
	}else{
		$('#erweima').attr('src', qxUrl);
	}
}
生成二维码:

<td align="right">
	<img id="erweima" src="" style="width:100px;height:100px;" />
</td>


你可能感兴趣的:(中文转码unicode)