Friday, February 14, 2014

How to disable a text field in HTML Form Using Onblur Event

<html>
<head>
<title>How to disable a text field in HTML Form Using Onclick Event</title>
<script>
function dis(){
var d=document.getElementById('input');
d.disabled=true;
}
</script>
</head>
<body>
<form>
<input type="text" id="input" onblur="javscript:dis()">
</form>
</body>
</html>



100% Working Code

Follows Us On  Facebook

How To Use Javascript Diffrent Way

JavaScript injection is a process by which we can insert and use our own JavaScript code in a page, either by entering the code into the address bar, or by finding an XSS vulnerability in a website. Note that the changes can only be seen by you and are not permanent. This is because JavaScript is a "client-side" language.

  1. 1
    You must enter the code in the URL address bar of the window. Try these injections:
    • Note - If you use firefox, you will have to use another way, like apple-shift-k on a mac
      Use JavaScript Injections Step 1.jpg
    • javascript:alert("Hello!");
      Use JavaScript Injections Step 2.jpg
    • To bring up an alert box saying "Hello!":
    Ad
  2. 2
    javascript:alert("Hello"); alert("World");


    Use JavaScript Injections Step 3.jpg
    • To bring up 2 alert boxes, the one in the front will say "Hello" and once you click OK, the one saying "World" will appear:
  3. Use JavaScript Injections Step 4.jpg
    3
    javascript:alert(document.forms[0].to.value="something")
    • To change the value of form [0] to something:
  4. Use JavaScript Injections Step 5.jpg
    4
    javascript:void(document.bgColor="blue")
  5. Use JavaScript Injections Step 6.jpg
    5
    javascript:alert("The actual url is:\t\t" + location.protocol + "//" + location.hostname + "/" + "\nThe address URL is:\t\t" + location.href + "\n" + "\nIf the server names do not match, this may be a spoof.");
    • To see the real server name of the site you are looking at. You should use it if you think that you are viewing a spoofed website, or anytime just to make sure:
  6. Use JavaScript Injections Step 7.jpg
    6
    javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0);
    • To make pictures fly around. Make sure to find a site like Google Images so there are more pictures!(If you press the refresh button, it goes really fast! might only work with MAC):
  7. Use JavaScript Injections Step 8.jpg
    7
    javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.cos(R*x1+i*x1+x2)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0);
    • To spin circle of pictures. It funnels the pictures in a snake-like motion:
  8. Use JavaScript Injections Step 9.jpg
    8
    javascript:document.body.contentEditable='true';document.designMode='on';void0
    • To move things around on the webpage:

Introduction Of Javascript

JavaScript (JS) is a dynamic computer programming language.[5] It is most commonly used as part of web browsers, whose implementations allow client-side scripts tointeract with the user, control the browser, communicate asynchronously, and alter thedocument content that is displayed.[5] It has also become common in server-side programming, game development and the creation of desktop applications.
JavaScript is a prototype-based scripting language with dynamic typing and has first-class functions. Its syntax was influenced by C. JavaScript copies many names and naming conventions from Java, but the two languages are otherwise unrelated and have very different semantics. The key design principles within JavaScript are taken from the Self and Scheme programming languages.[6] It is a multi-paradigm language, supporting object-oriented,[7] imperative, and functional[1][8] programming styles.
The application of JavaScript to use outside of web pages—for example, in PDFdocuments, site-specific browsers, and desktop widgets—is also significant. Newer and faster JavaScript VMs and platforms built upon them (notably Node.js) have also increased the popularity of JavaScript for server-side web applications. On the client side, JavaScript was traditionally implemented as an interpreted language but just-in-time compilation is now performed by recent (post-2012) browsers.
JavaScript was formalized in the ECMAScript language standard and is primarily used as part of a web browser (client-side JavaScript). This enables programmatic access to computational objects within a host environment.

Thursday, February 13, 2014

Introduction Of Java

Introduction Of Java

Java is a programming language created by James Gosling from Sun Microsystems (Sun) in 1991. The first publicly available version of Java (Java 1.0) was released in 1995.
Sun Microsystems was acquired by the Oracle Corporation in 2010. Oracle has now the steermanship for Java.
Over time new enhanced versions of Java have been released. The current version of Java is Java 1.7 which is also known as Java 7.
From the Java programming language the Java platform evolved. The Java platform allows software developers to write program code in other languages than the Java programming language and still runs on the Java virtual machine. The Java platform is usually associated with the Java virtual machine and the Java core libraries.

What Is PHP

PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.

Example #1 An introductory example

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>Example</title>
    </head>
    <body>

        <?php
            
echo "Hi, I'm a PHP script!";
        
?>
    </body>
</html>

Instead of lots of commands to output HTML (as seen in C or Perl), PHP pages contain HTML with embedded code that does "something" (in this case, output "Hi, I'm a PHP script!"). The PHP code is enclosed in special start and end processing instructions <?php and ?> that allow you to jump into and out of "PHP mode."
What distinguishes PHP from something like client-side JavaScript is that the code is executed on the server, generating HTML which is then sent to the client. The client would receive the results of running that script, but would not know what the underlying code was. You can even configure your web server to process all your HTML files with PHP, and then there's really no way that users can tell what you have up your sleeve.
The best things in using PHP are that it is extremely simple for a newcomer, but offers many advanced features for a professional programmer. Don't be afraid reading the long list of PHP's features. You can jump in, in a short time, and start writing simple scripts in a few hours.
Although PHP's development is focused on server-side scripting, you can do much more with it. Read on, and see more in the What can PHP do? section, or go right to the introductory tutorial if you are only interested in web programming.