我在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>
答案 0 :(得分:0)
我首先想到的可能是这种冲突阻止了jquery正常运行