0

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

这是我在 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>
4

1 回答 1

0

我的第一个想法可能是这种冲突正在阻止 jquery 正常运行

http://docs.jquery.com/Using_jQuery_with_Other_Libraries

于 2012-04-20T07:20:16.140 回答