使用“选项卡”在部分视图中加载脚本的问题-Asp.NET MVC5

时间:2019-05-31 13:59:56

标签: javascript razor asp.net-mvc-5

我在我的局部视图中执行脚本时遇到问题,当它是局部视图时,它是从tab1执行的,它的脚本加载没有问题,但是当我执行tab2时,我的脚本没有运行,并且出现错误。 / p>

这可能是导致错误的原因,我的脚本是主要布局。

<script src="~/Scripts/jquery-1.11.1.min.js"></script>
    <link href="~/Scripts/jqwidgets/styles/jqx.light.css" rel="stylesheet" />
    <link href="~/Scripts/jqwidgets/styles/jqx.base.css" rel="stylesheet" />
    <link href="~/Scripts/jqwidgets/styles/jqx.material.css" rel="stylesheet" />
    <link href="/js/jqwidgets/styles/jqx.material.css" rel="stylesheet" />
    <script src="~/Scripts/jqwidgets/jqxcore.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/jqxdata.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/jqxbuttons.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/jqxscrollbar.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/jqxmenu.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/jqxresponse.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/jqxcheckbox.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/jqxgrid.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/jqxgrid.pager.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/jqxgrid.selection.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/jqxnumberinput.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/jqxwindow.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/jqxlistbox.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/jqxdropdownlist.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/jqxinput.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/jqxgrid.filter.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/jqxdatetimeinput.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/jqxcalendar.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/globalization/globalize.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/jqxpanel.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/jqxgrid.selection.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/jqxgrid.sort.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/jqxdata.export.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/jqxgrid.export.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/jqxgrid.columnsresize.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/jqxgrid.grouping.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/jqxtabs.js" type="text/javascript"></script>
    <script src="~/Scripts/jqwidgets/jqxtooltip.js"></script>
    <script src="~/Scripts/demos.js"></script>

执行包含脚本的Action的代码将返回并将其发送到我的局部视图tab2。

<div class="formulario-datos2">
        <h3 style="margin-top:2px; text-align:center">Stock Actual de Productos</h3>

        @Html.Action("ObtieneStockActual")

    </div>

enter image description here

0 个答案:

没有答案