Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/JavaScript">
- function doAlert(){
- alert('Hi');
- }
- function doWrite(){
- document.getElementById("mydivision").innerHTML = "ABC";
- }
- function doWriteToText(){
- document.getElementById("mytext").value = "Encik Ijak";
- }
- function doSomething(){
- var i = 0;
- var myArea = "";
- for(i=0; i<=10; i++){
- myArea += "<p> Helloss " + i + " </p>";
- }
- document.getElementById("mydivision").innerHTML = myArea;
- var d = new Date();
- //var d = new Date(milliseconds);
- //var d = new Date(dateString);
- //var d = new Date(year, month, day, hours, minutes, seconds, milliseconds);
- alert(d);
- }
- function doGetData(){
- var s = document.getElementById("nav").innerHTML;
- var nS = "<font size='8'>";
- nS += s;
- nS += "</font>";
- document.getElementById("nav").innerHTML = nS;
- }
- function doGetDataOri(){
- document.getElementById("nav").innerHTML = "point your mouse here";
- }
- </script>
- <html>
- <body>
- Welcome to JavaScipt
- <form action="" method="post">
- <input type="submit" name="submit" value="Submit" onclick="doAlert()" />
- </form>
- <br>
- <input type="submit" name="submit" value="Click Here" onclick="doWrite()" />
- <br>
- <input type="submit" name="submit" value="Click Here" onclick="doWriteToText()" />
- <br>
- <input type="submit" name="submit" value="Run Do Something Function " onclick="doSomething()" />
- <div id="mydivision" >
- This is division area......
- </div>
- <br>
- <input type="text" id="mytext" value="" />
- <p onmouseup="doGetData()"> Increase Size</p>
- <p onmouseup="doGetDataOri()">Original Size</p>
- <div id="nav" >
- point your mouse here
- </div>
- </body>
- </html>
Add Comment
Please, Sign In to add comment