JQuery表单验证对我不起作用

时间:2016-01-13 17:02:48

标签: javascript php jquery codeigniter validation

我已经在http://jsfiddle.net/gLpHY/92/中测试了这段代码,在那里运行正常但是当我在计算机上运行它时它不起作用。 (我已经使用html和jquery测试了这个代码的两个版本,下次我用它们用php时,它们都不能用于我。)

Use [REPORTING] 
Go

Declare @start int, @finish int, @MAX_CampaignID int, @MIN_CampaignID int
Set @MAX_CampaignID = (select max(CampaignDetailsID) from [REPORTING].[dbo].[campaign_details_direct])
Set @MIN_CampaignID = (select min(CampaignDetailsID) from [REPORTING].[dbo].[campaign_details_direct])
Set @start = (select cast(replace(CampaignStart,'-','')as int) from [REPORTING].[dbo].[campaign_details_direct] where CampaignDetailsID = @MIN_CampaignID) 
Set @finish = (select cast(replace(CampaignFinish,'-','')as int) from [REPORTING].[dbo].[campaign_details_direct] where CampaignDetailsID = @MIN_CampaignID)

Select @start as start_date, @finish as end_date, @MAX_CampaignID as last_campaign_id, @MIN_CampaignID as first_campaign_id

While @MIN_CampaignID <= @MAX_CampaignID
Begin
    While @start <= @finish
        Begin
            Update Reporting.dbo.dim_date Set CampaignDetailsDirectID = @MIN_CampaignID
            Where dim_date.DateID = @start
                Set @start = @start + 1
        End
    Set @MIN_CampaignID = @MIN_CampaignID + 1
End
Go

2 个答案:

答案 0 :(得分:0)

尝试输入完整的网址而不是使用<?php echo base_url()?>,因为我看到这会导致打印网址两次出现问题,然后页面显然无法找到它。此外,不建议您编写.ready()的方式。您可能需要考虑在括号内添加文档,如下所示:

$(document).ready(function(){});

angular-fullstack

答案 1 :(得分:0)

首先,只用<?php echo base_url()?>替换/。您可以使用站点中资源的相对路径。路径应该是这样的:scr="/js/jquery-1.12.0.js"用于所有脚本。

第二次用$().ready(function () {

替换字符串$(function () {

希望这有帮助。