html dom getelementbyid,HTML DOM getElementById()

HTML DOM getElementById()

ThumbnailsDocument OutlineAttachments

Previous

Next

Highlight allMatch case

Presentation ModeOpenPrintDownloadCurrent View

Go to First PageGo to Last Page

Rotate ClockwiseRotate Counterclockwise

Text Selection ToolHand Tool

Document Properties…

Toggle Sidebar

Find

Zoom Out

Zoom InPresentation ModeOpenPrintDownloadCurrent View

Tools

Previous

NextAutomatic ZoomActual SizePage FitPage Width50%75%100%125%150%200%300%400%

More InformationLess Information

Close

Enter the password to open this PDF file:

CancelOK

File name:

-

File size:

-

Title:

-

Author:

-

Subject:

-

Keywords:

-

Creation Date:

-

Modification Date:

-

Creator:

-

PDF Producer:

-

PDF Version:

-

Page Count:

-

Close

Preparing document for printing…

0%

Cancel

f48d67d939d52a27903b4ff4fecb01bb.jpg?d=identicon&s=50Développement de logiciels

13 déc. 2013 (il y a 7 années et 7 mois)

757 vue(s)

757

Nombre total de vues

757

Voir sur TechyLib

0

Vues depuis Embeds

0

Favoris

0

Téléchargements

Largeur:  pixels

Hauteur:  pixels

Après avoir fait votre sélection, copiez/collez le code ci-dessous.

Retranscription de la présentation

HTML DOM getElementById()

Method

The getElementById() method returns a

reference to the first object with the

specified ID.

Syntax

document.getElementById(id)

function getValue()

{

var x=document.getElementById("myHeader")

alert(x.innerH)

}

This is a header

Click on the header to alert its value

DHTML

http://www.midlandstech.com/edu/ed/ism/k

irkpatrick/dhtml.html

AJAX

Asynchronous JavaScript And XML

AJAX is a type of programming made popular in 2005.

AJAX is not a new programming language, but a new way to use

existing standards combining JavaScript, CSS, HTML and XML.

Asynchronous

Not synchronized; that is, not occurring at

predetermined or regular intervals. The

term asynchronous is usually used to

describe communications in which data

can be transmitted intermittently rather

than in a steady stream.

For example, a telephone conversation is

asynchronous because both parties can

talk whenever they like. If the

communication were synchronous, each

party would be required to wait a specified

interval before speaking.

http://www.webopedia.com/TERM/A/asynch

ronous.html

AJAX uses JavaScript’s capability to use a

built

-

in object, XMLHttpRequest, to

communicate with a web server without

submitting a form or loading a page. It is

supported by most modern browsers.

Client

-

side

-

JavaScript

The script creates an XMLHttpRequest

object and sends to the web server.

The server responds by sending the

contents of a file, or the output of a

server

-

side program.

When the response arrives from the

server, a JavaScript function is triggered

to act on the data.

Because the goal is a more responsive

user interface, the script usually displays

the data from the server using the DOM,

eliminating the need for a page refresh.

Server

-

Side

The server responds to the client

-

side

request by sending the contents of a file,

or the output of a server

-

side program.

Not limited to XML on the server side. Can

be a program running a language such as

PHP, Perl, ASP.net, ColdFusion or even a

static file.

JavaScript can send data to a server

-

side

program using GET or POST methods, the

same two ways and HTML form works.

In a GET request, the data is encoded in the

URL that loads the program. In a post

request, it is sent separately and can

contain more data.

Example

EW.com

poll

Limitations of AJAX

The script and the XML data or server

-

side

program it requests data from must be on

the same domain.

IE 6 uses ActiveX to implement

XMLHttpRequest. Security settings in the

browser must be set to allow ActiveX.

Older browsers don’t support

XMLHttpRequest.

Can compromise the accessibility of a site

for users with disabilities

Users unaccustomed to AJAX may have

learning curve.

AJAX is based on the XMLHttpRequest

object.

Different browsers use different methods

to create the XMLHttpRequest object.

Internet Explorer 5 and IE 6 use an Active

Object, while other browsers use the built

-

in JavaScript object called

XMLHttpRequest.

Example

http://www.midlandstech.com/edu/ed/ism

/kirkpatrick/ajax/ajaxquiz.html

Files used

Ajax.js

Questions.xml

Quiz.js

List17.4.js

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值