+ 2
Can anyone help me out javascript is not working inside my iframe tag?
3 Respuestas
+ 3
Have you tried this one?
<iframe sandbox="allow-scripts">
+ 2
Please insert your code here so we can check it out:)
+ 2
the code is like this:
<body>
<iframe src="Mypage. html"/>
</body>
But as I load the website the JS part of Mypage. html doesn't seem to work.
Mypage. html is as:
<button onclick="displayDate()"/>
<div id="date"></div>
<script>
function displayDate(){
var c=new Date;
var x=document.getElementById("date").innerHTML=c.getFullYear();
</script>