iframe子框架中使用jq问题

WBOY
Release: 2016-06-23 14:26:37
Original
837 people have browsed it

php iframe jq jquery js

有3个iframe,在index里面加载jq了,如果子框架1,2,3要使用jq,必须在子框架中也加载jq文件吗,如下面的2.php,不加就无效
index.php
<script></script>

  
  
  


1.php

2.php
<script></script>

<script> <br /> alert($("#test").val()); <br /> </script>
3.php

回复讨论(解决方案)

框架页已是完整的页面,当然要单独加载相关的部件

必须要重新加载么,有没有办法只在主框架加载,其它子框架都可以使用的,要是子框架有很多页面,那不得个个都加载

加载是必须的!但是浏览器会缓存静态文件,所以框架页实际是从缓存区加载js文件的

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template