0

我正在尝试在使用 jquery 日历的 ASP Classic 中创建一个页面。我尝试遵循互联网上的几个教程,但不能。下面是我开发的代码。有人告诉我有什么问题吗?

下面是我正在开发的源代码:

<!--#include virtual = "/EcommerceNew/hidden/funcoes.asp"-->
<!--#include virtual = "/EcommerceNew/hidden/barra_progresso.asp"-->
<%
    Response.Buffer = true
    call Verificar_Login_Ativo()
    limite_excel            = 65000
%>
<html>
<head>
    <title></title>
    <script type="text/javascript" src="../../../javascript/jquery.tools.min.js"></script>
    <link href="../../stylesheets/style.css" rel="stylesheet" type="text/css">
    <link href="../../../stylesheets/calendario.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2>
            Relatório de vendas de jornais
        </h2>
    </div>
    <div class="linha">
        </ br> </ br>
    </div>
    <div class="linha">
        <div class="bloco_text">
            Data inicial
        </div>
        <div class="bloco_input">
            <input type="date" name="txtDataInicial">
        </div>
        <div class="bloco_text">
            Data Final
        </div>
        <div class="bloco_input">
            <input type="date" name="txtDataFinal">
        </div>
    </div>
    <div class="linha">
        </ br> </ br>
    </div>
    <div class="linha">
        <input name="Procurar" type="SUBMIT" class="btn" value="Consultar">
    </div>
    </form>
    <script type="text/javascript">
        $(":date").dateinput();
    </script>
</body>
</html>
4

2 回答 2

2

假设 dateinput() 是一个创建 datepicker- 而不是

 $(":date").dateinput();

尝试

 $("input[type='date']").dateinput();

并确保将其放在 DOM 加载后$(function(){ ... });

于 2012-05-11T20:23:42.803 回答
1

我的问题的解决方案是:

<!--#include virtual = "/EcommerceNew/hidden/funcoes.asp"-->
<!--#include virtual = "/EcommerceNew/hidden/barra_progresso.asp"-->
<%
    Response.Buffer = true
    'Guilherme teste - retirar após a conclusão do trabalho
    'call Verificar_Login_Ativo()
    limite_excel            = 65000
%>
<html>
<head>
    <title></title>
    <!--stylesheets-->
    <link href="../../stylesheets/style.css" rel="stylesheet" type="text/css">
    <link type="text/css" rel="Stylesheet" href="../../stylesheets/jquery-ui.css" />
    <!--javascripts-->
    <script type="text/javascript" src="../../javascripts/jquery.min.js"></script>
    <script type="text/javascript" src="../../javascripts/jquery-ui.min.js"></script>
    <script type="text/javascript" src="../../javascripts/jquery.ui.datepicker-pt-BR.js"></script>

    <!-- Exemplo 
    <link type="text/css" rel="Stylesheet" href="http://ajax.microsoft.com/ajax/jquery.ui/1.8.6/themes/smoothness/jquery-ui.css" />
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
    <script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.ui/1.8.6/jquery-ui.min.js"></script> 
    <!-- Exemplo fim -->

    <!-- Formatar data -->
    <script type="text/javascript">
    $(function () {
        $("#datainicial").datepicker();
    });
    $(function () {
        $("#datafinal").datepicker();
    });
    </script>

    <!-- scripts que eram utilizados pela vpc-->
    <script src="../hidden/iframe.js"></script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <h2>
            Relatório de vendas de jornais
        </h2>
    </div>
    <div class="linha">
        <br> <br>
    </div>
    <div class="linha">
        <div class="bloco_text">
            Data inicial
        </div>
        <div class="bloco_input">
            <input id="datainicial" type="text" />
        </div>
        <div class="bloco_text">
            Data Final
        </div>
        <div class="bloco_input">
            <input id="datafinal" type="text" />
        </div>
    </div>
    <div class="linha">
        <br> <br>
    </div>
    <div class="linha">
        <input name="Consultar" type="SUBMIT" class="btn" value="Consultar">
    </div>
    </form>
</body>
</html>
于 2012-05-14T13:48:13.747 回答