MVC前后端数据被编码

@{
ViewBag.Title = "Home Page";
}
<script>
function htmldecode(s) {
console.log(s);
var div = document.createElement('div');
div.innerHTML = s;
return div.innerText || div.textContent;
}
@{
var data = "<div>";
data = data + ViewBag.Title;
data += "</div>";

}
var data='@data' ;
console.log( htmldecode(data));
//或者

console.log('@Html.Raw(data)');

</script>

上一篇:【逆向&编程实战】Metasploit安卓载荷运行流程分析_复现meterpreter模块接管shell


下一篇:【metasploit】1 渗透测试与metasploit基础介绍 [PTES|msf|armitage安装]