Skip to main content

JAVASCRIPT Problems

Hello


Students check these javascript problems

  1. Add new elemts at the beginning of array
    <html >
    <body >
    <script language="javascript" >
    var scripts=new Array();
    scripts[0]="PHP";
    scripts[1]="ASP";
    scripts[2]="JAVASCRIPT";
    scripts[3]="HTML";
    document.write(scripts.join("< br > "));
    document.write("< br >---- NOW AFTER APPLYING unshift()---< br >");
    scripts.unshift("VBSCRIPT","PERL");
    document.write(scripts.join("< br >"));
    </script >
    </body >
    </html >

  2. Display Today's date and Time

    < html >
    < title >
    < /title >
    < body >
    < script language="javascript" >
    var d=new Date;
    document.write("< b > "+d);
    < /script >
    < /body >
    < /html >
  3. Add an element to position 2 in an array
    < html >
    < body >
    < script type="text/javascript" >
    var fruits = ["HTML", "JSP", "PHP", "ASP"];
    document.write("Removed: " + fruits.splice(2,0,"JAVASCRIPT") + "< br / >");
    document.write(fruits);
    < /script >
    < /body >
    < /html >

  4. Concatenate two arrays

    < html >
    < body >
    < h2 > concat arrays containig alphabets,numbers,symbols < /h2 >
    <script language="javascript" >
    var alphabets = ["a","b","c"];
    var numbers = ["1","2"];
    var symbols = ["@", "$","^"];
    var alphano = alphabets.concat(numbers,symbols);
    document.write(alphano);
    < /script >
    < /body >
    < /html >

  5. To concert today's date to string
    < html >
    < body >
    < script language="javascript" >
    var d =new Date();
    document.write("in original form");
    document.write(d +"< br/ > ");
    document.write("(according to UTC) to string:");
    document.write(d.toUTCString());
    < /script >
    < /body >
    < /html >

  6. TO remove first element of the array
    < html >
    < head >
    < title > Removing the first Element < /title >
    < script language="javascript" type="text/javascript" >
    < !--
    var x = new Array(1,2,3,4);
    var firstElement = x.shift();
    alert(firstElement);
    alert(2);
    alert(3);
    alert(4);
    alert(x);
    //-->
    < /script >
    < /head >
    < body >
    < h1 > Removing the first Element < /h1 >
    < /body >
    < /html >

  7. Replace character in a string
    < html>
    < body>
    < script language="javascript" >
    var str="LOGIN UR ID!";
    document.write(str.replace(/ID/,"ACCOUNT"));
    < /script >
    < /body >
    < /html >
  8. Reverse order of elements in the array
    < html >
    < title > JavaScript array reverse() example < /title >
    < body >
    < h2 >
    Example of reversing an array
    < /h2 >
    < script type="text/javascript" >
    var arr = new Array(3);
    arr[0]="1";
    arr[1]="2";
    arr[2]="3";
    document.write("< b > Array before reversed is < /b >="+arr+"< br > ");
    document.write("< b > Reversed array is < /b > ="+arr.reverse()+"<br > ");
    < /script >
    < /body >
    < /html >

compiled by PRAPTI

Comments

Popular posts from this blog

Advantages and Disadvantages of EIS Advantages of EIS Easy for upper-level executives to use, extensive computer experience is not required in operations Provides timely delivery of company summary information Information that is provided is better understood Filters data for management Improves to tracking information Offers efficiency to decision makers Disadvantages of EIS System dependent Limited functionality, by design Information overload for some managers Benefits hard to quantify High implementation costs System may become slow, large, and hard to manage Need good internal processes for data management May lead to less reliable and less secure data

Inter-Organizational Value Chain

The value chain of   a company is part of over all value chain. The over all competitive advantage of an organization is not just dependent on the quality and efficiency of the company and quality of products but also upon the that of its suppliers and wholesalers and retailers it may use. The analysis of overall supply chain is called the value system. Different parts of the value chain 1.  Supplier     2.  Firm       3.   Channel 4 .   Buyer

CONCEPTUAL VIEW OF MIS

The concept is a blend of principles, theories and practices of management, information and system giving rise to a single product called MANAGEMENT INFORMATION SYSTEM . The concept of management gives high regard to the individual and his ability to use the information. MIS gives information through data analysis. While analyzing the information, it relies on many academic disciplines like management science, OR, organization behavior, psychology, etc. The foundation of MIS is the principles of management and its practices. MIS uses the concept of management control in its design and relies heavily on the fact that the decision maker is a human being and is a human processor of information. A MIS can be evolved for a specific objective it is evolved after systematic planning and design. It calls for an analysis of business, management views and policies, organization culture and the management style. The MIS,therefore relies heavily on systems theory.The systems theory offers soluti