我在我的视图div上传PartialView。无效的正则表达式标志错误部分视图
这里是代码
<div id="right2" style=" border-style: solid; border-color: #1d69b4; border-radius: 10px;"> @Html.Partial("CalendarDefault") </div>
而且通过按钮,我需要一个PartialView更改为另一个
这里是按钮的代码
<button class="filled-button" onclick="myFunction()" style="background: #72c367">New Appointment</button>
而对于负载
JS代码<script>
function myFunction() {
$("#right2").load(@Url.Action("SheduleNewAppointment","Calendar"));
}
</script>
但我有以下错误
myFunction is not defined at HTMLButtonElement.onclick (Index:125) Uncaught SyntaxError: Invalid regular expression flags
我怎样才能解决呢?
您需要定义的“SheduleNewAppointment”中的Controler –