NOTICE

(Language : javascript)
  1. <script>
  2. var str1 = Math.round(Math.random()*1000);
  3. var str2 = Math.round(Math.random()*1000);
  4. </script>
  5. <body>
  6. <div id="test" style="position:absolute;">
  7. 가나다라
  8. </div>
  9. <script>
  10. document.getElementById("test").style.top = str1;
  11. document.getElementById("test").style.left = str2;
  12. </script>
  13. </body>


현재 윈도우 크기(x) - div 크기(width)
현재 윈도우 크기(y) - div 크기(height)

이 두 가지의 크기로 난수 발생을 시켜야 하는데.
귀찮아서. ㅈㅅ

뭐 일단 저렇게만 해도 새로 고침 했을 때마다 위치 변경은 된다.