Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jsp JQuery Mobile:嵌入的youtube频道不工作_Jsp_Jquery Mobile_Youtube Javascript Api_Youtube Channels - Fatal编程技术网

Jsp JQuery Mobile:嵌入的youtube频道不工作

Jsp JQuery Mobile:嵌入的youtube频道不工作,jsp,jquery-mobile,youtube-javascript-api,youtube-channels,Jsp,Jquery Mobile,Youtube Javascript Api,Youtube Channels,我的jsp页面是用JQuery mobile设计的。当我将youtube频道脚本标签嵌入其中时,它不起作用。但是当把标签放在简单的jsp文件中时,它就可以正常工作了。 我的代码如下: <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href=

我的jsp页面是用JQuery mobile设计的。当我将youtube频道脚本标签嵌入其中时,它不起作用。但是当把标签放在简单的jsp文件中时,它就可以正常工作了。 我的代码如下:

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet"
    href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script
    src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
</head>
<body>
    <div data-role="page">
        <div data-role="header">
            <a href="index.jsp" data-role="button" data-icon="home"
                data-iconpos="notext"></a>
            <h1>home</h1>

        </div>
        <!-- /header -->

        <div data-role="content">
            <script
                src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/youtube.xml&amp;up_channel=mychannel&amp;synd=open&amp;w=320&amp;h=390&amp;title=&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&amp;output=js"></div>
        <!-- /content -->

    </div>
    <!-- /page -->

</body>
</html>

您需要关闭脚本标记

下面是一个工作示例:

代码示例:

<!DOCTYPE html>
<html>
<head>
    <title>jQM Complex Demo</title>
    <meta name="viewport" content="width=device-width"/>
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
    <script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>    
</head>
<body>
    <div data-role="page" id="index">
        <div data-theme="a" data-role="header">
            <h3>
                First Page
            </h3>
            <a href="#second" class="ui-btn-right">Next</a>
        </div>

        <div data-role="content">
            <script src="http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/youtube.xml&amp;up_channel=mychannel&amp;synd=open&amp;w=320&amp;h=390&amp;title=&amp;border=%23ffffff%7C3px%2C1px+solid+%23999999&amp;output=js"></script>
        </div>

        <div data-theme="a" data-role="footer" data-position="fixed">

        </div>
    </div>   
</body>
</html>   

jQM复杂演示
首页