- Joined
- Aug 28, 2017
- Posts
- 1,088
- Solutions
- 1
- Reaction
- 630
- Points
- 504
- Age
- 22
Anong mali po dito sa code? Gusto ko kasi gumawa ng onclick iframe na pwede ma full screen yung video sa loob ng site.
<button onclick="openIframe()">Open Iframe</button>
<script>
function openIframe() {
var iframe = document.createElement('iframe');
iframe.width = '560';
iframe.height = '315';
iframe.src = 'You do not have permission to view the full content of this post. Log in or register now.
iframe.allowfullscreen = true;
var button = document.querySelector('button');
button.parentNode.replaceChild(iframe, button);
}
</script>
Di kasi nya nag fufull screen kahit iclick ko yung full screen eh, pero pag normal iframe lang na naka allowfullscreen gumagana naman
<button onclick="openIframe()">Open Iframe</button>
<script>
function openIframe() {
var iframe = document.createElement('iframe');
iframe.width = '560';
iframe.height = '315';
iframe.src = 'You do not have permission to view the full content of this post. Log in or register now.
iframe.allowfullscreen = true;
var button = document.querySelector('button');
button.parentNode.replaceChild(iframe, button);
}
</script>
Di kasi nya nag fufull screen kahit iclick ko yung full screen eh, pero pag normal iframe lang na naka allowfullscreen gumagana naman