如何访问父元素? [英] How to access the parent element?

查看:69
本文介绍了如何访问父元素?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我在javascript工作,我需要访问父元素。我在同一个文件夹中有4个不同的html文档。

名称是标题,代码,高尔夫,树。我目前在标题文档中,我想访问代码文档中的框架。我是javascript编程的新手,我知道这很简单。有人可以指出我正确的方向。

Hello, I am working in javascript and I need to access the parent element. I have 4 different html documents in the same folder.
The names are title, code, golf,tree. I am currently in the title document and I want to access a frame in the code document. I am new to programming in javascript and I know this is simple. Can someone please point me in the right direction.

推荐答案

请你发布与这个问题相关的html。当你想要访问它们时,当前是否加载了所有页面?


亲切的问候
could you please post the html that is relevant for this question. are all pages currently loaded when you want to access them?

kind regards


[HTML]<! -

关于JavaScript的新观点

教程6

案例问题3



文件名: title.html

支持文件:title.css

- >

< title>网页设计演示控制按钮< ; / title>

< link href =" title.css"的rel ="样式表"类型= QUOT;文本/ CSS" />


< script src ="" type =" text / javascript">< / script>

< script type =" text / javascript">


function showPreview()

" 100,*,1"。


< / script>

< / head>

[/ HTML]

这是我到目前为止的代码。我相信这个练习将加载所有页面。这是父页面。在上一篇文章中,我编写了一些名字,因为我觉得它们并不相关。其他页面的实际名称是css dem和html,带有html扩展名。所有页面都要加载到帧中。这是我的第一个涉及此级别对象的项目。如果你能指出我正确的方向,我将非常感激。


谢谢
[HTML]<!--
New Perspectives on JavaScript
Tutorial 6
Case Problem 3



Filename: title.html
Supporting files: title.css

-->
<title>Web Design Demo Control Buttons</title>
<link href="title.css" rel="stylesheet" type="text/css" />

<script src="" type="text/javascript"></script>

<script type="text/javascript">

function showPreview()

"100,*,1".

</script>
</head>
[/HTML]
This is the code I have so far. I believe in this exercise all pages will be loaded. This is the parent page. In the previous post I made up some of the names as I did not feel they were relevant. The actual names of the other pages are css dem and html with the html extension. All pages are to load into frames. This is my first project involving objects at this level. If you can just point me in the right direction I would greatly appreciate it.

Thanks


这个页面加载到框架中了吗?你说你需要访问父母...所以显示父页面...


亲切的问候
is this page loaded in a frame? you said that you need to access the parent ... so show the parent page ...

kind regards


这篇关于如何访问父元素?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆