A web programming language is used for computer programming (often shortened to programming, scripting or coding) that have relation on the World Wide Web. The programming languages have many different types as other artificial languages, and the two types of these that's used for the Web, are listed below:
- A scripting is the number one type of programming language that's often used for web development, and this kind of type is divided into two different classes which are nested here:
- A client-side scripting, sometimes called as browser-side scripting, is an act to program the web browser of the viewer of a client-side scripted web page or site. In other words, all of client-side scripts are executable on a web browser that supported it.
- JavaScript is the world's most popular programming language as it's for the websites, servers, PCs, laptops, tablets, smart phones, and more! An external JavaScript file have .js extension. JavaScript is the only client-side scripting language that supported by all major web browsers, unlike VBScript (Visual Basic Scripting Edition) a Microsoft scripting language which only supported by Internet Explorer.
JavaScript Input's Sample: <p id="fnmpl"></p>
<script>
setInterval(function() {
timer()
}, 1000);
function timer() {
var d = new Date();
var t = d.toLocaleTimeString();
var weekday = new Array(7);
weekday[0] = "Sunday";
weekday[1] = "Monday";
weekday[2] = "Tuesday";
weekday[3] = "Wednesday";
weekday[4] = "Thursday";
weekday[5] = "Friday";
weekday[6] = "Saturday";
var day = weekday[d.getDay()];
var date = d.getDate();
var month = new Array();
month[0] = "January";
month[1] = "February";
month[2] = "March";
month[3] = "April";
month[4] = "May";
month[5] = "June";
month[6] = "July";
month[7] = "August";
month[8] = "September";
month[9] = "October";
month[10] = "November";
month[11] = "December";
var m = month[d.getMonth()];
var y = d.getFullYear();
document.getElementById("fnmpl").innerHTML = t + ', ' + day + ', ' + date + ' ' + m + ', ' + y;
}
</script>
Sample's Page Output: - A server-side scripting is an act to program the server of a web document or site, such what content will the web server deliver to a specific user. In other view, a server-side script will first executes on the web server before the server deliver it to a web browser.
- “PHP: Hypertext Preprocessor” or PHP is the most used server-side scripting language and was designed for web development. One of the reasons why this language was often used by web developers is because almost all web hosting companies and even a free host have supported this computer language.
PHP Input's Sample: <?php
$a = 1;
$b = $a + $a;
echo '1 + 1 is equal to ' . $b . ".<br />\n";
$c = $b + $b;
echo '2 + 2 is equal to ' . $c . ".<br />\n";
$d = $c * $c;
echo '4 * 4 is equal to ' . $d . ".<br />\n";
$e = $d / $b;
echo '16 / 2 is equal to ' . $e . ".<br />\n<br />\n";
if ($d > $e) {
$f = 'Yes';
} else {
$f = 'No';
}
echo "Is $d is greater than $e?<br />\n";
echo 'The answer is: ' . $f . "<br />\n<br />\n";
if ($c < $b) {
$g = 'Yes';
} else {
$g = 'No';
}
echo "Is $c is less than $b?<br />\n";
echo 'The answer is: ' . $g . "<br />\n<br />\n";
if ($a + $a == $c - $b) {
echo "$a + $a is equal to $c - $b.<br />\n<br />\n";
} else {
echo "$a + $a is not equal to $c - $b.<br />\n<br />\n";
}
if ($a + $a != $c - $b) {
echo "$a + $a and $c - $b is not equal.<br />\n<br />\n";
} else {
echo "$a + $a and $c - $b is equal.<br />\n<br />\n";
}
echo 'The variable $a holds the value ' . $a . ".<br />\n";
echo 'The variable $b holds the value ' . $b . ".<br />\n";
echo 'The variable $c holds the value ' . $c . ".<br />\n";
echo 'The variable $d holds the value ' . $d . ".<br />\n";
echo "The value $e holds by the variable " . '$e' . ".<br />\n";
echo "The value $f holds by the variable " . '$f' . ".<br />\n";
echo "The value $g holds by the variable " . '$g' . ".<br />\n";
?>
The Sample's Source Output would be like: 1 + 1 is equal to 2.<br />
2 + 2 is equal to 4.<br />
4 * 4 is equal to 16.<br />
16 / 2 is equal to 8.<br />
<br />
Is 16 is greater than 8?<br />
The answer is: Yes<br />
<br />
Is 4 is less than 2?<br />
The answer is: No<br />
<br />
1 + 1 is equal to 4 - 2.<br />
<br />
1 + 1 and 4 - 2 is equal.<br />
<br />
The variable $a holds the value 1.<br />
The variable $b holds the value 2.<br />
The variable $c holds the value 4.<br />
The variable $d holds the value 16.<br />
The value 8 holds by the variable $e.<br />
The value Yes holds by the variable $f.<br />
The value No holds by the variable $g.<br />
- A client-side scripting, sometimes called as browser-side scripting, is an act to program the web browser of the viewer of a client-side scripted web page or site. In other words, all of client-side scripts are executable on a web browser that supported it.
- There are many object-oriented programming languages or computer languages with object-oriented features, such as C++ where Microsoft Windows are almost entirely written in, but only few of them can be use for web development.
- ECMAScript is a standard for a scripting language, which widely used for client-side scripting on the Web. Actually, JavaScript is an ECMAScript. ECMAScript is a prototype-based programming language a style of object-oriented programming in which classes are not present, nor data structures and unions.
- ActionScript is used to program the actions of a flash, for developing Adobe Flash animations, vector graphics, games and Rich Internet Applications (RIAs) which often in the Small Web Format that have an .swf file extension and can be played in Adobe Flash Player. An animation software is used to create a flash where ActionScript is needed. A flash consists more than one file type including ActionScript file which has an .as extension. There are many intended extensions for a flash, such .flv for Flash Video files which either used from within .swf files or played through an flv-aware player like Windows Media Player.
ActionScript Input's Sample: addEventListener(Event.ENTER_FRAME, namearrow); function namearrow(e:Event):void { arrow_image_file.x = mouseX; arrow_image_file.Y = mouseY; }
This input sample of ActionScript will not work alone, means that it was definitely lack of other parts and needed to be compile first, for a flash to be work. When this script was used correctly in a complete flash files' package to construct a flash, the "arrow_image_file" on the sample is a name of an existed image's basename and the "namearrow" is the name of a function which can be change as well as the "arrow_image_file", depend on the choice of the developer, and then when the compete package compiled, the "arrow_image_file" image on a frame the flash, will keep following the mouse' pointer as where is it unless if it's on the outside of the frame.
- ECMAScript is a standard for a scripting language, which widely used for client-side scripting on the Web. Actually, JavaScript is an ECMAScript. ECMAScript is a prototype-based programming language a style of object-oriented programming in which classes are not present, nor data structures and unions.
No comments:
Post a Comment
You can use some HTML tags, such as <b>, <i> and <a> tags, but please do not spam.