2012-04-20 85 views
0

我正在做一些东西在jsp页面中使用JQuery Mobile,但我的页面没有加载jquery时,我运行它,因为相同的脚本工作正常,当我使它的HTML,我无法弄清楚确切的问题?我很欣赏这个问题的任何解决方案..Jquery没有加载JSP页面

下面是我用我的JSP页面的代码..

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" 
    pageEncoding="ISO-8859-1" import="org.apache.struts.action.DynaActionForm, com.sigma.sickkids.global.GlobalConstants"%> 
<!DOCTYPE html> 
<html> 

<head> 

<meta name="viewport" content="width=device-width, initial-scale=1; user-scalable=no"> 
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> 

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" /> 
<link rel="stylesheet" href="scripts-css/style.css" /> 

<link rel="stylesheet" href="scripts-css/master.css" type="text/css" media="screen" title="no title"> 
<script type="text/javascript" charset="utf-8" src="scripts-css/cordova-1.5.0.js"></script> 
<script type="text/javascript" charset="utf-8" src="scripts-css/main.js"></script> 

<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script> 
<script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script> 

<script src="scripts-css/custom-form-elements.js" type="text/javascript"></script> 
<link rel="stylesheet" href="scripts-css/styleform.css" /> 

<script src="scripts-css/mobiscroll-1.6.min.js" type="text/javascript"></script> 
<link href="scripts-css/mobiscroll-1.6.min.css" rel="stylesheet" type="text/css" /> 

<script> 

    function go(loc){ 
     window.location.href = loc; 
    } 



$('#homepage').load(function(){ 
    $("input[type='checkbox']").attr("checked",false).checkboxradio("refresh"); 
    var pretype=document.getElementById("editreg"); 
    var servdate=document.getElementById("servdate"); 


    var currentTime = new Date() 
    var month = currentTime.getMonth() + 1 
    var day = currentTime.getDate() 
    var year = currentTime.getFullYear() 
    servdate.value=$('#regdate').html(); //month + "/" + day + "/" + year; 
    $(.abc).hide("fast"); 

     function goToByScroll(id){ 
      id = id.replace("link", ""); 
      $('html,body').animate({scrollTop: $("#"+id).offset().top},'slow'); 
     } 
     $('#verify').change(function(){ 
      if(this.checked){$('#div1').show("slow");} 
         else {$('#div1').hide("slow");} 
      goToByScroll("div1"); 
     }); 

     $("#servcode").change(function() { 
      if ($(this).val()=="nodate") {    
       $('#depend :input').attr('disabled', true); 
       $('#depend :input').val(""); 
       } 
      else { 
       $('#depend :input').attr('disabled', false); 
       } 
     }); 




    }); 

</script> 
</head> 

回答