Beruflich Dokumente
Kultur Dokumente
3. Define Hyperlink.
It is a link that allows user to navigate (jump) from one document to another document
quickly. Using hyperlink, to save time complexity.
Hyperlink is highlighted and change to hand symbol, when mouse pointer moves over
hyperlink.
In html page hyperlinks are defined with text or images that always refer are multimedia
effort (audio, video), that always refer existing document, internet resource files.
<A> anchor It defining link to html document.
<a> -------- </a>
< a href = “URL”>.
href attribute represents the URL of document, that contain between (Text or image). A tag
is referred as hyperlink.
3
(i) Assigning the tag attributes
In this method the event handler code can be assigned to the attribute of an element.
Example : Element.onclick=my_fun;
That means when user clicks on the element the event hander function my fun() will be
called. Note that we must not use parenthesis while specifying the function my_fun.
< HTML>
4
<HEAD>
<TITLE>Status Bar Clock</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
var flasher = false
// calculate current time, determine flasher state,
// and insert time into status bar every second
function updateTime() {
var now = new Date()
var theHour = now.getHours()
var theMin = now.getMinutes()
var theTime = "" + ((theHour > 12) ? theHour - 12 : theHour)
theTime += ((theMin < 10) ? ":0" : ":") + theMin
theTime += (theHour >= 12) ? " pm" : " am"
theTime += ((flasher) ? " " : "*")
flasher = !flasher
window.status = theTime
// recursively call this function every second to keep timer going
timerID = setTimeout("updateTime()",1000)
}
//-->
</SCRIPT>
</HEAD>
<BODY onLoad="updateTime()">
</BODY>
</HTML>
20. Name and mention the use of any four methods in JavaScript Math object.
function superClass() {
5
this.supertest = superTest; //attach method superTest
}
function subClass() {
this.inheritFrom = superClass;
this.inheritFrom();
this.subtest = subTest; //attach method subTest
}
function superTest() {
return "superTest";
}
function subTest() {
return "subTest";
}
//-->
</script>
24. What are the two commonly used port numbers and its purpose in FTP
6
Control connection - For sending control information like user identification, password,
commands to change the remote directory, commands to retrieve and store files etc., FTP
makes use of control connection. Control connection is initiated on port number 21.
Data connection - For sending the actual file, FTP makes use of data connection. Data
connection is initiated on port number 20.
25. State the purpose of SMTP and POP3 protocols in Email Sercive.
Simple Mail Transfer Protocol (SMTP) is the standard protocol for sending emails across
the Internet.
Post Office Protocol version 3 (POP3) is a standard mail protocol used to receive
emails from a remote server to a local email client. POP3 allows to download email
messages on our local computer and read them even when you are offline.
26. How an email address are linked with the html pages?
HTML <a> tag provides you option to specify an email address to send an email. While
using <a> tag as an email tag,
Example: a href = "mailto: abc@example.com">Send Email</a>
Function Description
decodeURI() Decodes a URI
encodeURI() Encodes a URI
eval() Evaluates a string and executes it as if it was script code
isFinite() Determines whether a value is a finite, legal number
isNaN() Determines whether a value is an illegal number
Number() Converts an object's value to a number
parseFloat() Parses a string and returns a floating point number
parseInt() Parses a string and returns an integer
String() Converts an object's value to a string
7
The DOM tree will be, root
Document
parent node
siblings
child node
<title> <h1> <h2 <h3>
leaf nodes >
8
<h2>My Webpage</h2>
This is my webpage.
<?php
echo "This is written in PHP.\n";
?>
a. relative – relative position according to where the element would appear with static
position
b. absolute – position according to the innermost positioned parent element
Example:
H1
{
position: absolute; top: 100px; left: 200px;
}
35. Define: Markup language.
Markup languages are designed for the processing, definition and presentation of text.
The language specifies code for formatting, both the layout and style, within a text file. The
code used to specify the formatting are called tags.
9
Loosely Typed Language
Real-Time Access Monitoring
39.What is POP3?
Post Office Protocol 3. is a simple, standardized method of delivering e-mail messages. A
POP3 mail server receives e-mails and filters them into the appropriate user folders. When
a user connects to the mail server to retrieve his mail, the messages are downloaded from
mail server to the user's hard disk.
The <a> tag is used to create an anchor to link from, the href attribute is used to tell the
address of the document or page we are linking to, and the words between the open and
close of the anchor tag will be displayed as a hyperlink.
11
define("PI", 3.14);
define("HEADING", "<h1>My Web Site</h1>");
There are six possible values that typeof returns: object, boolean, function, number, string, and
undefined.
54.Define: Polymorphism.
The polymorphism is a core concept of an object-oriented paradigm that provides a way to
perform a single action in different forms. It provides an ability to call the same method on
different JavaScript objects. As JavaScript is not a type-safe language, we can pass any type of
data members with the methods.
12
Example
<script>
class A
{
display()
{
document.writeln("A is invoked");
}
}
class B extends A
{
}
var b=new B();
b.display();
</script>
13