0

它曾经可以工作,但是当我包含一个 jquery-ui 选项卡时。它突然有一个错误..所以这就是我所说的

Dim strCallScript As String = "$(function() { " & _
        "$('#dialog').dialog('open'); " & _
        "});  "
        ClientScript.RegisterStartupScript(Page.GetType(), "error", strCallScript, True)

这是它的功能

 $(function myFunction(){ 
            $( "#dialog" ).dialog({ 
                autoOpen: false,
                modal: true,
                buttons: {
                    OK: function() {
                        $(this).dialog("close");
                    }
                } 
            });                                                
        });           

这是它的 div

<div id="dialog" title="Invalid Date Range" class="ui-dialog ui-widget ui-widget-content ui-corner-all"> 
                    <div class="ui-widget">
                        <div class="ui-state-error ui-corner-all" style="padding: 0 .7em;">
                            <p>
                                <span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span>
                                Please enter starting date.
                            </p>
                        </div>
                    </div> 
                </div>   

这是错误:

在此处输入图像描述

请帮忙。谢谢 :)

4

1 回答 1

0

这是我的错误:)

Dim strCallScript As String = "$(function myFunction(){ " & _
        "$(function() { " & _
        "$('#dialog').dialog('open'); " & _
        "});  " & _
        "});  "

    ClientScript.RegisterStartupScript(Page.GetType(), "error", strCallScript, True)

本来应该是这样的

于 2013-02-15T07:12:19.267 回答