Professional Documents
Culture Documents
Jawa Web Tech
Jawa Web Tech
Javascript, Java, JSP & Servlet, MySQL, Regular Expression); for(i=0; i<arr.length; i++){ str=arr[i]; if( str.match(regex) == input){ alert(Matching string is : +str); } } }
XML Schema An XML Schema defines how to structure an XML document and it can be used in place of DTD. XML Schema is based on XML. XML Schema language is known as XML Schema Definition (XSD). The Purpose of XML Schema Some of the main purposes of XML Schema are to define: 1. Elements which can occur in the xml document. 2. The child elements for an elements 3. The order of child elements 4. The number of child elements 5. Whether the element is empty or it can have some text 6. The type of data elements or attributes can have 7. Attributes which can be used for the elements used in a document 8. Default and fixed values for elements and attributes <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="book"> <xs:complexType> <xs:sequence> <xs:element name="book-name" type="xs:string"/> <xs:element name="book-author" type="xs:string"/> <xs:element name="short-desc" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> </xs:schema>
accessed via any language available in the browser, including Java, JavaScript/ECMAScript/JScript, and VBScript (MSIE only). For practicality's sake, the syntax used in this tutorial will be that of JavaScript. The DOM is supported most completely starting in IE 5 and Gecko (NS6 and upwards, such as Firefox.) Every tag, attribute, style, and piece of text is available to be accessed and manipulated via the DOM -- the possibilities are endless. This tutorial will cover the basics of the DOM: adding and removing tags, attributes and styles, animating existing elements, and hiding/ showing elements on a page. Obviously, to cover the entire scope of all that the DOM has to offer, an entire book is needed. This tutorial simply serves as an introduction to the subject. Just so you know. The DOM is constantly being revised by the W3C, with browsers at the same time constantly trying to support the latest recommended version of the DOM. As of IE6 and Firefox 1.0, DOM 2 best encompasses what the two browsers currently support. DOM 3 is the next major version in the works. Before you get started, you need to know a few terms that we will use: Node: A reference to an element, its attributes, or text from the document. Element: A representation of a <TAG>. Attribute: A property of an element. HREF is an attribute of <A>, for example. With that said, lets discuss browser compatibility now.
organizations that run a firewall. The problem with Applets is that they run inside the firewall so these restrictions help prevent malicious code. Other Security Restrictions Non-local Applets may not access the system properties. This keeps websites with Applets from reading information from your local computer. Only locally run Applets can do these advanced things. Applets cannot execute other files on your local machine. This prevents an applet from deleting files or running malicious code on your local machine. Applets may not be able to define classes that belong to certain packages. Typically, they cannot define classes for the java and sun packages. Also, Netscape does not permit applets to define classes in the Netscape package.
Each and every interactive component must be registered and unregistered with particular event and Listener. The general form of registration and un-registration methods is as follows: public void addxxxListener (xxxListener); public void removexxxListener (xxxListener);
Java vs JavaScript
Java and JavaScript are programming languages. Java is an object oriented programming language whereas JavaScript is more of a scripting language. Both can be used to make web pages more interactive. However, Java is also used to develop server side applications and standalone programming. Java Java is an object oriented programming language. In early 1990s, Sun Microsystems developed the Java language. Initially, it was designed to make small programs for the web browser called applets. But later on, Java was used to create applications based on e-commerce. There are five main features of Java language: Provides more flexibility to develop software applications because of object oriented approach. Easy to use as it combines the best properties of other programming languages. Allows code written in Java to run on different platforms or Java code is independent of platform. The code from the remote source can be executed securely. Built-in support for computer networks. Java also supports automated memory management model that allows developers to get rid of the time consuming method called manual memory management. Programmers can easily do this by implementing automatic garbage collection. But according to some people, Java is slow as well as consumes more memory than other programming languages such as C++. JavaScript JavaScript is also a programming language which is used to make web pages more dynamic as well as interactive. Constant downloads from the server are not required in case of JavaScript as it runs on the users computer. JavaScript is different from the Java programming language. Most modern day web browsers have built-in JavaScript. However, JavaScript based web pages can run only if JavaScript is enabled on the web browser and the browser supports it. JavaScript is enabled in most browsers by default. No special program is required in order to write code in JavaScript as it is an interpreted language. You can use any text editor such as Notepad in order to write JavaScript code. You can also use other text editor that colorizes the different codes making it easier to detect any error. JavaScript is different from HTML because JavaScript is used to create more dynamic web pages while HTML is a markup language that is used to create static content on the web page. You can insert the JavaScript code in a HTML file by using the <script> tag. But if you want to use the script in different pages of the website then you can save the scripts in different files with .js extension.
What is XML?
XML stands for EXtensible Markup Language XML is a markup language much like HTML XML was designed to carry data, not to display data XML tags are not predefined. You must define your own tags XML is designed to be self-descriptive XML is a W3C Recommendation
JApplet a class that enables applets to use Swing components. JApplet is a subclass of
java.applet.Applet, which is covered in the Java Applets trail. Any applet that contains Swing components must be implemented with a subclass of JApplet.Because JApplet is a top-level Swing container, each Swing applet has a root pane.JApplet has a single content pane.The default layout manager for a Swing applet's content pane is BorderLayout. init, start, stop, and destroy
controls in AWT
an awt conrols is a component that allows the end users to interact with applications created in java.All AWT controls in java are subclass of component class. the component class provides the add() method to add awt components to containers such as applet windows. The components are: LAbel,Button, heckboxes, radio buttons choice, textr field text areas scroll bar
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html> <head> <title>My first styled page</title> <style type="text/css"> body { padding-left: 11em; font-family: Georgia, "Times New Roman",
Times, serif; color: purple; background-color: #d8da3d } ul.navbar { position: absolute; top: 2em; left: 1em; width: 9em } h1 { font-family: Helvetica, Geneva, Arial, SunSans-Regular, sans-serif } </style> </head> <body>