我对cordova / phonegap的新手.....刚为我的项目准备了一个简单的移动应用程序.....与mozilla firefox工作正常但事件永远不会在Android模拟器和设备中触发......搜索解决了很多问题....我已经包含了cordova.js ....似乎没有什么工作正常...这里是我的javascript和html文件....使用jquery.mobile框架... ..是什么错误的onclick()事件,因为它与Mozilla浏览器工作正常???
function getsemester(sem)
{
localStorage.semester=sem;
}
function getbranch(br)
{
localStorage.branch=br;
}
var branches=['C.S','I.T','E.C','MECHANICAL','CIVIL'];
function ref()
{ if(localStorage.branch==5)
{
if(localStorage.semester==3)
{
document.getElementById("refer1").innerHTML=civilsem3[7*(localStorage.subject-5*(localStorage.semester-1))];
document.getElementById("refer2").innerHTML=civilsem3[7*(localStorage.subject-5*(localStorage.semester-1))+1];
document.getElementById("refer3").innerHTML=civilsem3[7*(localStorage.subject-5*(localStorage.semester-1))+2];
document.getElementById("refer4").innerHTML=civilsem3[7*(localStorage.subject-5*(localStorage.semester-1))+3];
document.getElementById("refer5").innerHTML=civilsem3[7*(localStorage.subject-5*(localStorage.semester-1))+4];
document.getElementById("refer6").innerHTML=civilsem3[7*(localStorage.subject-5*(localStorage.semester-1))+5];
document.getElementById("refer7").innerHTML=civilsem3[7*(localStorage.subject-5*(localStorage.semester-1))+6];
}
else if(localStorage.semester==4)
{
document.getElementById("refer1").innerHTML=civilsem4[7*(localStorage.subject-5*(localStorage.semester-1))];
document.getElementById("refer2").innerHTML=civilsem4[7*(localStorage.subject-5*(localStorage.semester-1))+1];
document.getElementById("refer3").innerHTML=civilsem4[7*(localStorage.subject-5*(localStorage.semester-1))+2];
document.getElementById("refer4").innerHTML=civilsem4[7*(localStorage.subject-5*(localStorage.semester-1))+3];
document.getElementById("refer5").innerHTML=civilsem4[7*(localStorage.subject-5*(localStorage.semester-1))+4];
document.getElementById("refer6").innerHTML=civilsem4[7*(localStorage.subject-5*(localStorage.semester-1))+5];
document.getElementById("refer7").innerHTML=civilsem4[7*(localStorage.subject-5*(localStorage.semester-1))+6];
}
else if(localStorage.branch==2 && (localStorage.subject==12 || localStorage.subject==17))
{
if(localStorage.subject==12)
{
document.getElementById("refer1").innerHTML=itsem3[0];
document.getElementById("refer2").innerHTML=itsem3[1];
document.getElementById("refer3").innerHTML=itsem3[2];
document.getElementById("refer4").innerHTML=itsem3[3];
document.getElementById("refer5").innerHTML=itsem3[4];
document.getElementById("refer6").innerHTML=itsem3[5];
document.getElementById("refer7").innerHTML=itsem3[6];
}
else if(localStorage.subject==17)
{
document.getElementById("refer1").innerHTML=itsem4[0];
document.getElementById("refer2").innerHTML=itsem4[1];
document.getElementById("refer3").innerHTML=itsem4[2];
document.getElementById("refer4").innerHTML=itsem4[3];
document.getElementById("refer5").innerHTML=itsem4[4];
document.getElementById("refer6").innerHTML=itsem4[5];
document.getElementById("refer7").innerHTML=itsem4[6];
}
}
else if((localStorage.branch==1 || localStorage.branch==2))
{
if(localStorage.semester==3)
{
document.getElementById("refer1").innerHTML=cssem3[7*(localStorage.subject-5*(localStorage.semester-1))];
document.getElementById("refer2").innerHTML=cssem3[7*(localStorage.subject-5*(localStorage.semester-1))+1];
document.getElementById("refer3").innerHTML=cssem3[7*(localStorage.subject-5*(localStorage.semester-1))+2];
document.getElementById("refer4").innerHTML=cssem3[7*(localStorage.subject-5*(localStorage.semester-1))+3];
document.getElementById("refer5").innerHTML=cssem3[7*(localStorage.subject-5*(localStorage.semester-1))+4];
document.getElementById("refer6").innerHTML=cssem3[7*(localStorage.subject-5*(localStorage.semester-1))+5];
document.getElementById("refer7").innerHTML=cssem3[7*(localStorage.subject-5*(localStorage.semester-1))+6];
}
else if(localStorage.semester==4)
{
document.getElementById("refer1").innerHTML=cssem4[7*(localStorage.subject-5*(localStorage.semester-1))];
document.getElementById("refer2").innerHTML=cssem4[7*(localStorage.subject-5*(localStorage.semester-1))+1];
document.getElementById("refer3").innerHTML=cssem4[7*(localStorage.subject-5*(localStorage.semester-1))+2];
document.getElementById("refer4").innerHTML=cssem4[7*(localStorage.subject-5*(localStorage.semester-1))+3];
document.getElementById("refer5").innerHTML=cssem4[7*(localStorage.subject-5*(localStorage.semester-1))+4];
document.getElementById("refer6").innerHTML=cssem4[7*(localStorage.subject-5*(localStorage.semester-1))+5];
document.getElementById("refer7").innerHTML=cssem4[7*(localStorage.subject-5*(localStorage.semester-1))+6];
}
else if(localStorage.semester==5 && localStorage.branch==2)
{
document.getElementById("refer1").innerHTML=itsem5[7*(localStorage.subject-5*(localStorage.semester-1))];
document.getElementById("refer2").innerHTML=itsem5[7*(localStorage.subject-5*(localStorage.semester-1))+1];
document.getElementById("refer3").innerHTML=itsem5[7*(localStorage.subject-5*(localStorage.semester-1))+2];
document.getElementById("refer4").innerHTML=itsem5[7*(localStorage.subject-5*(localStorage.semester-1))+3];
document.getElementById("refer5").innerHTML=itsem5[7*(localStorage.subject-5*(localStorage.semester-1))+4];
document.getElementById("refer6").innerHTML=itsem5[7*(localStorage.subject-5*(localStorage.semester-1))+5];
document.getElementById("refer7").innerHTML=itsem5[7*(localStorage.subject-5*(localStorage.semester-1))+6];
}
else if(localStorage.semester==5 && localStorage.branch==1)
{
document.getElementById("refer1").innerHTML=cssem5[7*(localStorage.subject-5*(localStorage.semester-1))];
document.getElementById("refer2").innerHTML=cssem5[7*(localStorage.subject-5*(localStorage.semester-1))+1];
document.getElementById("refer3").innerHTML=cssem5[7*(localStorage.subject-5*(localStorage.semester-1))+2];
document.getElementById("refer4").innerHTML=cssem5[7*(localStorage.subject-5*(localStorage.semester-1))+3];
document.getElementById("refer5").innerHTML=cssem5[7*(localStorage.subject-5*(localStorage.semester-1))+4];
document.getElementById("refer6").innerHTML=cssem5[7*(localStorage.subject-5*(localStorage.semester-1))+5];
document.getElementById("refer7").innerHTML=cssem5[7*(localStorage.subject-5*(localStorage.semester-1))+6];
}
else if(localStorage.semester==6 && localStorage.branch==2)
{
document.getElementById("refer1").innerHTML=itsem6[7*(localStorage.subject-5*(localStorage.semester-1))];
document.getElementById("refer2").innerHTML=itsem6[7*(localStorage.subject-5*(localStorage.semester-1))+1];
document.getElementById("refer3").innerHTML=itsem6[7*(localStorage.subject-5*(localStorage.semester-1))+2];
document.getElementById("refer4").innerHTML=itsem6[7*(localStorage.subject-5*(localStorage.semester-1))+3];
document.getElementById("refer5").innerHTML=itsem6[7*(localStorage.subject-5*(localStorage.semester-1))+4];
document.getElementById("refer6").innerHTML=itsem6[7*(localStorage.subject-5*(localStorage.semester-1))+5];
document.getElementById("refer7").innerHTML=itsem6[7*(localStorage.subject-5*(localStorage.semester-1))+6];
}
else if(localStorage.semester==6 && localStorage.branch==1)
{
document.getElementById("refer1").innerHTML=cssem6[7*(localStorage.subject-5*(localStorage.semester-1))];
document.getElementById("refer2").innerHTML=cssem6[7*(localStorage.subject-5*(localStorage.semester-1))+1];
document.getElementById("refer3").innerHTML=cssem6[7*(localStorage.subject-5*(localStorage.semester-1))+2];
document.getElementById("refer4").innerHTML=cssem6[7*(localStorage.subject-5*(localStorage.semester-1))+3];
document.getElementById("refer5").innerHTML=cssem6[7*(localStorage.subject-5*(localStorage.semester-1))+4];
document.getElementById("refer6").innerHTML=cssem6[7*(localStorage.subject-5*(localStorage.semester-1))+5];
document.getElementById("refer7").innerHTML=cssem6[7*(localStorage.subject-5*(localStorage.semester-1))+6];
}
else if(localStorage.semester==7 && localStorage.branch==2)
{
document.getElementById("refer1").innerHTML=itsem7[7*(localStorage.subject-5*(localStorage.semester-1))];
document.getElementById("refer2").innerHTML=itsem7[7*(localStorage.subject-5*(localStorage.semester-1))+1];
document.getElementById("refer3").innerHTML=itsem7[7*(localStorage.subject-5*(localStorage.semester-1))+2];
document.getElementById("refer4").innerHTML=itsem7[7*(localStorage.subject-5*(localStorage.semester-1))+3];
document.getElementById("refer5").innerHTML=itsem7[7*(localStorage.subject-5*(localStorage.semester-1))+4];
document.getElementById("refer6").innerHTML=itsem7[7*(localStorage.subject-5*(localStorage.semester-1))+5];
document.getElementById("refer7").innerHTML=itsem7[7*(localStorage.subject-5*(localStorage.semester-1))+6];
}
else if(localStorage.semester==7 && localStorage.branch==1)
{
document.getElementById("refer1").innerHTML=cssem7[7*(localStorage.subject-5*(localStorage.semester-1))];
document.getElementById("refer2").innerHTML=cssem7[7*(localStorage.subject-5*(localStorage.semester-1))+1];
document.getElementById("refer3").innerHTML=cssem7[7*(localStorage.subject-5*(localStorage.semester-1))+2];
document.getElementById("refer4").innerHTML=cssem7[7*(localStorage.subject-5*(localStorage.semester-1))+3];
document.getElementById("refer5").innerHTML=cssem7[7*(localStorage.subject-5*(localStorage.semester-1))+4];
document.getElementById("refer6").innerHTML=cssem7[7*(localStorage.subject-5*(localStorage.semester-1))+5];
document.getElementById("refer7").innerHTML=cssem7[7*(localStorage.subject-5*(localStorage.semester-1))+6];
}
else if(localStorage.semester==8 && localStorage.branch==2)
{
document.getElementById("refer1").innerHTML=itsem8[7*(localStorage.subject-5*(localStorage.semester-1))];
document.getElementById("refer2").innerHTML=itsem8[7*(localStorage.subject-5*(localStorage.semester-1))+1];
document.getElementById("refer3").innerHTML=itsem8[7*(localStorage.subject-5*(localStorage.semester-1))+2];
document.getElementById("refer4").innerHTML=itsem8[7*(localStorage.subject-5*(localStorage.semester-1))+3];
document.getElementById("refer5").innerHTML=itsem8[7*(localStorage.subject-5*(localStorage.semester-1))+4];
document.getElementById("refer6").innerHTML=itsem8[7*(localStorage.subject-5*(localStorage.semester-1))+5];
document.getElementById("refer7").innerHTML=itsem8[7*(localStorage.subject-5*(localStorage.semester-1))+6];
}
else if(localStorage.semester==8 && localStorage.branch==1)
{
document.getElementById("refer1").innerHTML=cssem8[7*(localStorage.subject-5*(localStorage.semester-1))];
document.getElementById("refer2").innerHTML=cssem8[7*(localStorage.subject-5*(localStorage.semester-1))+1];
document.getElementById("refer3").innerHTML=cssem8[7*(localStorage.subject-5*(localStorage.semester-1))+2];
document.getElementById("refer4").innerHTML=cssem8[7*(localStorage.subject-5*(localStorage.semester-1))+3];
document.getElementById("refer5").innerHTML=cssem8[7*(localStorage.subject-5*(localStorage.semester-1))+4];
document.getElementById("refer6").innerHTML=cssem8[7*(localStorage.subject-5*(localStorage.semester-1))+5];
document.getElementById("refer7").innerHTML=cssem8[7*(localStorage.subject-5*(localStorage.semester-1))+6];
}
}
/* DEFAULT CONDITION */
else
{
document.getElementById("refer1").innerHTML="nothing stored right now";
document.getElementById("refer2").innerHTML="nothing stored right now";
document.getElementById("refer3").innerHTML="nothing stored right now";
document.getElementById("refer4").innerHTML="nothing stored right now";
document.getElementById("refer5").innerHTML="nothing stored right now";
document.getElementById("refer6").innerHTML="nothing stored right now";
document.getElementById("refer7").innerHTML="nothing stored right now";
}
}
function display()
{
document.getElementById("subject").innerHTML="Displaying subjects of "+branches[parseInt(localStorage.branch)-1]+" branch "+" Semester "+parseInt(localStorage.semester);
}
function display2()
{
document.getElementById("write").innerHTML=branches[parseInt(localStorage.branch)-1]+" branch "+" semester "+parseInt(localStorage.semester);
}
function abc(br)
{
getbranch(br);
/*display();*/
display2();
sem();
}
function sem()
{ var i;
i=5*(localStorage.semester-1);
if(localStorage.branch==1)
{ document.getElementById("1").innerHTML=cssubjects[i];
document.getElementById("2").innerHTML=cssubjects[i+1];
document.getElementById("3").innerHTML=cssubjects[i+2];
document.getElementById("4").innerHTML=cssubjects[i+3];
document.getElementById("5").innerHTML=cssubjects[i+4];
}
else if(localStorage.branch==2)
{ document.getElementById("1").innerHTML=itsubjects[i];
document.getElementById("2").innerHTML=itsubjects[i+1];
document.getElementById("3").innerHTML=itsubjects[i+2];
document.getElementById("4").innerHTML=itsubjects[i+3];
document.getElementById("5").innerHTML=itsubjects[i+4];
}
else if(localStorage.branch==3)
{ document.getElementById("1").innerHTML=ecsubjects[i];
document.getElementById("2").innerHTML=ecsubjects[i+1];
document.getElementById("3").innerHTML=ecsubjects[i+2];
document.getElementById("4").innerHTML=ecsubjects[i+3];
document.getElementById("5").innerHTML=ecsubjects[i+4];
}
else if(localStorage.branch==4)
{ document.getElementById("1").innerHTML=mesubjects[i];
document.getElementById("2").innerHTML=mesubjects[i+1];
document.getElementById("3").innerHTML=mesubjects[i+2];
document.getElementById("4").innerHTML=mesubjects[i+3];
document.getElementById("5").innerHTML=mesubjects[i+4];
}
else if(localStorage.branch==5)
{ document.getElementById("1").innerHTML=civilsubjects[i];
document.getElementById("2").innerHTML=civilsubjects[i+1];
document.getElementById("3").innerHTML=civilsubjects[i+2];
document.getElementById("4").innerHTML=civilsubjects[i+3];
document.getElementById("5").innerHTML=civilsubjects[i+4];
}
}
function getsubject(sub)
{ // add if statements
localStorage.subject=sub;
diskitaab();
ref();
}
function diskitaab(br)
{ if(localStorage.branch==1)
{ document.getElementById("kitaab").innerHTML="You chose "+branches[localStorage.branch-1]+" branch "+" semester "+localStorage.semester+" subject "+cssubjects[localStorage.subject];
document.getElementById("sub").innerHTML=cssubjects[localStorage.subject];
}
else if(localStorage.branch==2)
{ document.getElementById("kitaab").innerHTML="You chose "+branches[localStorage.branch-1]+" branch "+" semester "+localStorage.semester+" subject "+itsubjects[localStorage.subject];
document.getElementById("sub").innerHTML=itsubjects[localStorage.subject];
}
else if(localStorage.branch==3)
{ document.getElementById("kitaab").innerHTML="You chose "+branches[localStorage.branch-1]+" branch "+" semester "+localStorage.semester+" subject "+ecsubjects[localStorage.subject];
document.getElementById("sub").innerHTML=ecsubjects[localStorage.subject];
}
else if(localStorage.branch==4)
{ document.getElementById("kitaab").innerHTML="You chose "+branches[localStorage.branch-1]+" branch "+" semester "+localStorage.semester+" subject "+mesubjects[localStorage.subject];
document.getElementById("sub").innerHTML=mesubjects[localStorage.subject];
}
else if(localStorage.branch==5)
{ document.getElementById("kitaab").innerHTML="You chose "+branches[localStorage.branch-1]+" branch "+" semester "+localStorage.semester+" subject "+civilsubjects[localStorage.subject];
document.getElementById("sub").innerHTML=civilsubjects[localStorage.subject];
}
}

downloaded flat_ui css and included it in html file

<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
<meta charset="utf-8">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
<link rel="stylesheet" type="text/css" href="css/classic-theme.css">
<link rel="stylesheet" type="text/css" href="css/jquery.mobile.css">
<script type="text/javascript" src="js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="js/jquery.mobile.js"></script>
<link rel="stylesheet" type="text/css" href="css/overwrite.css">
<!-- <link rel="stylesheet" type="text/css" href="css/index.css"> -->
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript" src="js/overwrit.js"></script>
<link rel="stylesheet" href="themes/jquery.mobile.icons.min.css">
<link rel="stylesheet" href="themes/jquery.mobile.structure-1.4.5.min.css">
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
<link rel="stylesheet" href="themes/jquery.mobile.flatui.css">
<script type="text/javascript" src="cordova.js"></script>
<title>My app</title>
</head>
<body>
<div id="year" data-role="page" data-title="year" data-theme="a">
<div data-role="header" data-id="head" data-position="fixed">
<h3>Select year</h3>
</div><!-- header -->
<div data-role="content">
<div data-role="controlgroup">
<div data-role="collapsibleset">
<div data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u">
<h3>I year</h3>
<ul data-role="listview" class="pd">
<li><a href="#branch" data-role="button" data-transition="fade" onclick="getsemester(1)" data-icon="carat-r">I SEM</a></li>
<li><a href="#branch" data-role="button" data-transition="fade" onclick="getsemester(2)" data-icon="carat-r">II SEM</a></li>
</ul>
</div><!-- collapsible -->
<div data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u">
<h3>II year</h3>
<ul data-role="listview" class="pd">
<li><a href="#branch" data-role="button" data-transition="fade" onclick="getsemester(3)" data-icon="carat-r">III SEM</a></li>
<li><a href="#branch" data-role="button" data-transition="fade" onclick="getsemester(4)" data-icon="carat-r">IV SEM</a></li>
</ul>
</div><!-- collapsible -->
<div data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u">
<h3>III year</h3>
<ul data-role="listview" class="pd">
<li><a href="#branch" data-role="button" data-transition="fade" onclick="getsemester(5)" data-icon="carat-r">V SEM</a></li>
<li><a href="#branch" data-role="button" data-transition="fade" onclick="getsemester(6)" data-icon="carat-r">VI SEM</a></li>
</ul>
</div><!-- collapsible -->
<div data-role="collapsible" data-collapsed-icon="carat-d" data-expanded-icon="carat-u">
<h3>IV year</h3>
<ul data-role="listview" class="pd">
<li><a href="#branch" data-role="button" data-transition="fade" onclick="getsemester(7)" data-icon="carat-r">VII SEM</a></li>
<li><a href="#branch" data-role="button" data-transition="fade" onclick="getsemester(8)" data-icon="carat-r">VIII SEM</a></li>
</ul>
</div><!-- collapsible -->
</div>
</div><!-- controlgroup -->
</div><!-- content -->
<div data-role="footer" data-id="foot" data-position="fixed">
<div data-role="navbar">
<ul>
<li><a href="#settings" data-icon="gear" iconpos="notext"></a></li>
<li><a href="#home" data-icon="home" iconpos="notext"></a></li>
<li><a href="#course" data-role="button" data-icon="back" data-iconpos="notext" data-transition="flip"></a></li>
</ul>
</div>
</div><!-- footer -->
</div><!-- year -->
<div id="branch" data-role="page" data-theme="a">
<div data-role="header" data-id="head" data-position="fixed">
<h3>Select Branch</h3>
</div><!-- header -->
<div data-role="content">
<div data-role="controlgroup">
<ul data-role="listview">
<li><a href="#subject" data-role="button" data-transition="fade" data-icon="carat-r" onclick="abc(1)">C.S</a></li>
<li><a href="#subject" data-role="button" data-transition="fade" data-icon="carat-r" onclick="abc(2)">I.T</a></li>
<li><a href="#subject" data-role="button" data-transition="fade" data-icon="carat-r" onclick="abc(3)">E.C</a></li>
<li><a href="#subject" data-role="button" data-transition="fade" data-icon="carat-r" onclick="abc(4)">Mechanical</a></li>
<li><a href="#subject" data-role="button" data-transition="fade" data-icon="carat-r" onclick="abc(5)">Civil</a></li>
</ul>
</div><!-- controlgroup -->
</div><!-- content -->
<div data-role="footer" data-id="foot" data-position="fixed">
<div data-role="navbar">
<ul>
<li><a href="#settings" data-icon="gear" iconpos="notext"></a></li>
<li><a href="#home" data-icon="home" iconpos="notext"></a></li>
<li><a href="#year" data-role="button" data-icon="back" data-iconpos="notext" data-transition="flip"></a></li>
</ul>
</div>
</div><!-- footer -->
</div><!-- branch -->
<div id="subject" data-role="page" data-theme="a">
<div data-role="header" data-id="head" data-position="fixed">
<h3>Select Subject</h3>
</div><!-- header -->
<div data-role="content">
<h6>Displaying subjects of</h6>
<h5 id="write"></h5>
<a href="#books" data-transition="fade" data-role="button" id="1" onclick="getsubject(5*(localStorage.semester-1))"></a>
<a href="#books" data-transition="fade" data-role="button" id="2" onclick="getsubject(5*(localStorage.semester-1)+1)"></a>
<a href="#books" data-transition="fade" data-role="button" id="3" onclick="getsubject(5*(localStorage.semester-1)+2)"></a>
<a href="#books" data-transition="fade" data-role="button" id="4" onclick="getsubject(5*(localStorage.semester-1)+3)"></a>
<a href="#books" data-transition="fade" data-role="button" id="5" onclick="getsubject(5*(localStorage.semester-1)+4)"></a>
</div><!-- content -->
<div data-role="footer" data-id="foot" data-position="fixed">
<div data-role="navbar">
<ul>
<li><a href="#settings" data-icon="gear" iconpos="notext"></a></li>
<li><a href="#home" data-icon="home" iconpos="notext"></a></li>
<li><a href="#branch" data-role="button" data-icon="back" data-iconpos="notext" data-transition="flip"></a></li>
</ul>
</div>
</div><!-- footer -->
</div><!-- subject -->
<!-- ****Books Here***** -->
<div id="books" data-role="page" data-theme="a">
<div data-role="header" data-id="head" data-position="fixed">
<h3>Reference Books</h3>
<a href="#info" data-role="button" data-icon="info" data-iconpos="notext" data-rel="dialog"></a>
</div><!-- header -->
<div data-role="content">
<div id="kitaab"></div>
<center><h3 id="sub"></h3></center>
References:
<ul>
<li id="refer1"></li>
<li id="refer2"></li>
<li id="refer3"></li>
<li id="refer4"></li>
<li id="refer5"></li>
<li id="refer6"></li>
<li id="refer7"></li>
</ul>
</div><!-- content -->
<div data-role="footer" data-id="foot" data-position="fixed">
<div data-role="navbar">
<ul>
<li><a href="#settings" data-icon="gear" iconpos="notext"></a></li>
<li><a href="#home" data-icon="home" iconpos="notext"></a></li>
<li><a href="#subject" data-role="button" data-icon="back" data-iconpos="notext" data-transition="flip"></a></li>
</ul>
</div>
</div><!-- footer -->
</div><!-- books -->
<div data-role="page" id="info" data-theme="a">
<div data-role="header" data-id="head" data-position="fixed">
<h3>:D</h3>
</div>
<div data-role="content">
<center><h3>KEEP CALM</h3>
<h5>and refer</h5>
<h2>SHIVANI</h2></center>
</div>
</div><!-- dialog -->
<div id="settings" data-role="page" data-theme="a">
<div data-role="header" data-id="head" data-position="fixed">
<h3>Settings</h3>
</div><!-- header -->
<div data-role="content">
<a href="index.theme1.html" data-role="button">Change Theme</a>
</div>
<div data-role="footer" data-id="foot" data-position="fixed">
<div data-role="navbar">
<ul>
<li><a href="#home" data-icon="home" iconpos="notext"></a></li>
</ul>
</div>
</div><!-- footer -->
</div>
</body>
</html>
&#13;
答案 0 :(得分:0)
Cordova / Phonegap需要内容安全策略标记( Info Here ),默认情况下会出现在cordova项目中。
此标记基本上是阻止/允许某些与安全相关的内容策略。
您的标签:
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
要在您的网页上使用内嵌javascript,您应该'unsafe-inline'
在https://ssl.gstatic.com
之后添加$url = http://ichart.finance.yahoo.com/table.csv?s=INTC&c=2014&f=2015&a=0&d=0&b=1&e=1&g=d&ignore=.csv
到您要使用内联js的网页的所有content-security-policy标记
有关如何使用content-security-policy标记的详细信息,请参阅此答案顶部的链接。