Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/71.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
使用/访问jQuery UI从index.html到index.html中的框架_Jquery_Html - Fatal编程技术网

使用/访问jQuery UI从index.html到index.html中的框架

使用/访问jQuery UI从index.html到index.html中的框架,jquery,html,Jquery,Html,我被命令使用框架(而不是iFrame)来设置项目。我已经创建了这些帧,并设置了所有帧中帧的上下文覆盖。我遇到的问题是,我无法在这些框架中使用jQuery UI。有人知道跨框架访问jQuery UI的方法吗 **main.html** <!DOCTYPE> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title&

我被命令使用框架(而不是iFrame)来设置项目。我已经创建了这些帧,并设置了所有帧中帧的上下文覆盖。我遇到的问题是,我无法在这些框架中使用jQuery UI。有人知道跨框架访问jQuery UI的方法吗

**main.html**
<!DOCTYPE>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>Untitled Document</title>
  <link rel="stylesheet" href="style/jquery-ui-1.8.21.custom.css" type="text/css">
  <script type="text/javascript" src="scripts/jquery-1.8.3.min.js"></script>
  <script type="text/javascript" src="scripts/jquery-ui-1.8.21.custom.min.js"></script>
</head>

<frameset rows="*,660,*" framespacing="0" frameborder="0" border="0">
    <frame src="border.html" name="border" title="border" scrolling="no" noresize="noresize" tabindex="-1" />
    <frame src="test.html" name="body" title="body" scrolling="no" noresize="noresize" tabindex="1" />
    <frame src="border.html" name="border" title="border" scrolling="no" noresize="noresize" tabindex="-1" />
</frameset>
<noframes></noframes>
</html>

**test.html**
<!DOCTYPE>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
</head>
<body>
<script type="text/javascript">
    var $ = function(a){return top.$(a, this.document);} /* jQuery Context Overwrite */

    $("#slider").slider();
</script>

<div id="slider"></div>
</body>
</html>
**main.html**
无标题文件
**test.html**
无标题文件
var$=函数(a){return top.$(a,this.document);}/*jQuery上下文覆盖*/
$(“#滑块”).slider();

我能够跨框架使用jQuery并覆盖上下文,但我无法访问UI。我错过了什么?提前感谢。

尝试在test.html中包含jquery ui,结果显示jquery未定义。我真的希望不要在每个页面上都包含jQuery ui,只包含index.htmlI意味着main.html而不是index.html。对不起,你知道HTML5中不推荐使用
标记吗?HTML5不支持传统框架。考虑到这一点,重新设计布局可能比尝试使用不推荐的项目要好。