Showing posts with label JavaScript. Show all posts
Showing posts with label JavaScript. Show all posts

Monday, March 18, 2013

Forms and Meanings, Programming Languages

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:
  1. 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:
    1. 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:

    2. 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.