yeah, took me 15 min to done it.. the point of it to test your web in different W and H.
index:
JS:Code:<html> <head> <title>Test Your Web!</title> <script src="JS.js"> </script> <style> body { background-color:#366; } </style> </head> <body> <input type="color" name="iFrame_Color" style="position:absolute; top:0px; left:0px; width:155px; height:50px; background-color:inherit"> <input placeholder="EX: asp.net" type="text" name="iFrame_Src" style="position:absolute; top:50px; left:0px; background-color:inherit"> <input placeholder="Screen Width" type="text" name="iFrame_W" style="position:absolute; top:80px; left:0px; background-color:inherit"> <input placeholder="Screen Height" type="text" name="iFrame_H" style="position:absolute; top:110px; left:0px; background-color:inherit"> <input type="button" value="Post Frame" onClick="JS_PrepareFrame()" style="position:absolute; top:140px; left:0px; width:155px; background-color:transparent;"> <input type="button" value="Restore Frame" onClick="JS_Restore()" style="position:absolute; top:170px; left:0px; width:155px; background-color:transparent;"> </body> </html>
Code:function JS_Restore() { location.reload(); document.getElementById("iframe").reset(); } function JS_PrepareFrame() { var Src = document.getElementsByName('iFrame_Src')[0].value; var Width = document.getElementsByName('iFrame_W')[0].value; var Height = document.getElementsByName('iFrame_H')[0].value; var Color = document.getElementsByName('iFrame_Color')[0].value; iFrame = document.createElement("iframe"); iFrame.setAttribute("src", "http://"+Src); iFrame.style.position = "absolute"; iFrame.style.top = 0+"px"; iFrame.style.left = 300+"px"; iFrame.style.width = Width+"px"; iFrame.style.height = Height+"px"; iFrame.style.backgroundColor = Color; document.body.appendChild(iFrame); }



Reply With Quote


