-
Posts
3 -
Joined
-
Last visited
Posts posted by Peter
-
-
Thank you for your answer, maybe I am doing it wrong but I get not the actualy value off the results.
This is my script:
<script type="text/javascript" src="http://americanoldtimers.nl/js/jquery-1.4.2.min.js"></script> <script> jQuery(window).resize(function() { viewportwidth=window.innerWidth,viewportheight=window.innerHeight; $('.results').html(viewportwidth); $('.results2').html(viewportheight); } ); </script> <span class='results'>Width</span> <BR> <span class='results2'>Height</span> <P> <span class='results'>Width</span> <BR> <span class='results2'>Height</span> <script> // How can I get the Width and Height here in javascript? </script> <script> // And at the same time the Width and Height here in javascript? </script
When you risize the screen you get the width and height. You can see the script working at: http://americanoldtimers.nl/testje.php
-
I am working this out for weeks, now it is time to ask the experts.
When I put
<span class='results'></span>
on my website I get output on screen.
How is it possible to do this with javascript, how can I replace this code for javascript and put the value in an variable?
html code to javascript
in Javascript Help
Posted
Thank you again for your answer but this wil not work.
I made an other script it works always but not on an I-phone. :-(
You can find it here?
http://americanoldtimers.nl/test16.php
Maybe has someone an solution?