<div class="pages"> <span>显示</span> <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value}, 'jbsxBox')"> <option value="20">20</option> <option value="50">50</option> <option value="100">100</option> <option value="200">200</option> </select> <span>条,共50条</span> </div>
这样写在浏览器查看源文件没有问题
但是在mvc中 我换成下面这种写法
<div class="pages"> <span>显示</span> @Html.DropDownList("numPerPage", ViewData["numPerPage"] as SelectList, new { @class = "combox", onchange = "navTabPageBreak({numPerPage:this.value},'jbsxBox')" }) <span>条,共 @ViewData["recordCount"]条</span> </div>
查看源文件 onchange="navTabPageBreak({numPerPage:this.value},'jbsxBox')" 变成了这样
而导致我的js调用出错 怎么让他显示' html 编码 '这样
通过\'jbsxBox\' 还以一样
暂时没想到怎么解决