Archive for the ‘HTML Code’ Category
Hello World in different languages
Posted July 6, 2012
on:- In: C Language Source Code | C Language Tutorials | COBOL Source Code | COBOL Tutorials | CPP Source Code | CPP Tutorials | CSS Code | CSS Tutorials | How to's | HTML Code | HTML Tutorials | Java Source Code | Java Tutorials | JavaScript Tutorials | PHP Source Code | PHP Tutorials | Web Design Tutorials
- 4 Comments
Objectives :
* How to write Hello World in Java?
* How to write Hello World in C?
* How to write Hello World in PHP?
* How to write Hello World in C++?
* How to write Hello World in JavaScript?
* How to write Hello World in HTML?
* How to write Hello World in CSS?
* How to write Hello World in COBOL?
Java
class HelloWorld { public static void main(String args[]) { System.out.println(“Hello World!”); } }
C
#include #include void main() { clrscr(); printf(“Hello World!”); getch(); }
C++
#include #include void main() { clrscr(); cout<getch(); }
CSS
body:before { content: “Hello World”; }
COBOL
**************************** IDENTIFICATION DIVISION. PROGRAM-ID. HELLO ENVIRONMENT DIVISION. DATA DIVISION. PROCEDURE DIVISION. MAIN SECTION. DISPLAY “Hello World!” STOP RUN ****************************
HTML
<html> <head> <title>Hello World Example</title> </head> <body> Hello World! </body> </html>
JavaScript
document.write("Hello World");
PHP
<!--?php echo ‘Hello World!’ ?-->
Linux Shell Script
echo "Hello World !"
Enjoy coding!
Posted from WordPress for Android
Objectives :-
* How to execute multiple functions on single HTML event?
* How to call multiple funtions on single HTML event?
Many time you may have faced this issue, you may need to call / execute multiple functions on single HTML event & you may have stucked there, stop working, changed the functionality, etc.
But now don’t worry about it anymore. Here is the Code to execute multiple functions on a single HTML event :-
<html> <head> <script type="text/javascript"> function Message1 () { alert ("Message1"); } function Message2 () { alert ("Message2"); } </script> </head> <body> <form name="NameTheForm"> <input type="Button" name="buttonName" onclick="Message1(); Message2()"> </form> </body> </html>
The above code will execute / call two functions on single HTML event. Here for example I have written two functions but you can write multiple functions & can call them to onclick event separated by semicolon (;) as shown above.
Posted from WordPress for Android