JS 从HTML页面获取自定义属性值
<select id="nextType" data-parameter="@Model.NextType"> <option value="" >请选择</option> </select> var data_nextType = document.getElementById("nextType").getAttribute("data-Parameter");
或
var data_nextType = document.getElementById("nextType").attributes['data-Parameter'].nodeValue;