add queryObjects demo
This commit is contained in:
Родитель
8990bbe6ab
Коммит
6124307b20
|
@ -0,0 +1,19 @@
|
|||
<!--
|
||||
Copyright 2016 Google Inc.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<button>button 1 (inside an iframe)</button>
|
||||
<script>
|
||||
var b1 = document.querySelector('button');
|
||||
</script>
|
|
@ -0,0 +1,34 @@
|
|||
<!--
|
||||
Copyright 2016 Google Inc.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title>queryObjects() Demo</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
<body>
|
||||
<h1>queryObjects() Demo</h1>
|
||||
<iframe src="queryobjects-iframe.html" width="100%" height="25%"
|
||||
title="iframe for queryObjects() demo"></iframe>
|
||||
<button id="b2">button 2</button>
|
||||
<button id="b3">button 3</button>
|
||||
<button>button 4 (no JS reference)</button>
|
||||
<script>
|
||||
var b2 = document.getElementById('b2');
|
||||
var b3 = document.getElementById('b3');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Загрузка…
Ссылка в новой задаче