外文原文Word格式.docx

上传人:b****5 文档编号:18843103 上传时间:2023-01-01 格式:DOCX 页数:11 大小:20.43KB
下载 相关 举报
外文原文Word格式.docx_第1页
第1页 / 共11页
外文原文Word格式.docx_第2页
第2页 / 共11页
外文原文Word格式.docx_第3页
第3页 / 共11页
外文原文Word格式.docx_第4页
第4页 / 共11页
外文原文Word格式.docx_第5页
第5页 / 共11页
点击查看更多>>
下载资源
资源描述

外文原文Word格式.docx

《外文原文Word格式.docx》由会员分享,可在线阅读,更多相关《外文原文Word格式.docx(11页珍藏版)》请在冰豆网上搜索。

外文原文Word格式.docx

tableofthename\"

Target=\"

designatedtheinformationsubmittedwindow\"

Action=\"

receiveawindowprocedurethecorrespondingurl\"

Method=informationdatatransfermode(get/post)

Enctype=\"

formcodingway\"

[onsubmit=\"

javascriptcode\"

]>

1.1.2windowobjectmethod

Thewindowobjectisonlyonemethodof-submit()method,thismethodisrealizingthemajorfunctionoftheformoftheinformationsubmitted.Submitmytestform,thenusethefollowingformat:

Document.Mytest.Submit()

1.1.3formobject'

sproperties

Formthepropertiesofanobjectmainlyincludethefollowing:

elementsnameactiontargetencodingmethod.

Inadditiontotheelements,severalotherreflectedtheformofidentificationofthecorrespondingpropertiesstate,thisisusuallyasingleformmarks;

AndelementsareoftenDuoGeformelementsofanarray,forexample:

value

Elements[0].Mytable.Elements[1]

1.1.4visitthewindowobject

Injavascriptaccessthewindowobjectcanbemadeoftwokindsofmethod:

Throughthevisitforms:

intheformoftheattributesoftheobjectmustspecifythenameformfirst,andthencanthroughthefollowingformsuchas:

documentlogovisit.Mytable().

Throughthearraytovisitform:

inadditiontousingtheformtovisittheformof,youusethewindowobjectarraytovisitthewindowobject.Butneedtopayattentiontoabit,becausethewindowobjectisbythebrowserenvironment,andprovidethebrowserenvironmentprovidethearraysubscriptisfrom0ton.Socanachievethroughfollowingformatwindowobjectvisit:

Document.Forms[0]

Document.Forms[1]

Document.Forms[2]...

1.1.5quotedthepreconditionoftheform

Injavascripttoformintheconditionsofthereferenceis:

mustfirstusedinthepage,andwillcreateformlogodefinitionformbeforepartsinreference.

1.2thebasicelementsform

Thebasicelementsintheformofbutton,radiobuttons,checkbutton,submitbutton,resetbutton,textboxetc.

Tovisitinjavascriptthesebasicelements,mustthroughthecorrespondingspecificformelementsarraysubscriptorformelementstorealizea.Eachelementisprimarilythroughtheelementsattributesormethodtoreference.Thebasicformatseequote:

Formname.Elements[].Methadname(form.Elementnameorarrayname.Method)

Formname.Elemaent[].Propertyname(form.Elementnameorarrayname.Attributes)

Belowareintroduced:

1.2.1textinputelementsshallseparate

Function:

tomarktheelementsinthetexttoimplementeffectivecontrol.

Basicproperties:

Name:

settheinformationwhensubmitinformationname.CorrespondingtotheHTMLdocumentname.

Value:

tosettinginawindowinHTMLdocumentsofthecorrespondingvalueinformation.

Defaultvalue:

includingtextelementsofthedefaultvalues

Basicmethods:

Blur():

willthecurrentfocusmovedtothebackground.

Select():

highlighttext.

Themainevent:

Onfocus:

whentextgainsfocus,producetheevents.

Onblur:

fromelementslosesfocus,producetheevents.

Onselect:

whenwordsarehighlightedaftertheshow,producethefile.

Onchange:

whentextelementsvaluechange,producethedocument.

Example:

...

formname=\"

test\"

>

inputtype=\"

text\"

name=\"

value=\"

thisisajavascript\"

scriptlanguage=\"

javascirpt\"

Document.Mytest.Value=\"

thatisajavascript\"

;

Document.Mytest.Select();

Document.Mytest.Blur();

/script>

Domanymoretextarea1.2.2listedinputelements

theimplementationoftheelementsoftextareacontrol.

Basicattribute

settheinformationwhensubmitinformationname,correspondingtothetextareaHTMLdocumentname.

Defaultvalue:

theelementthedefaultvalues.

Methods:

willlosetheinputfocus

willhighlighttext

Event:

whenlostaftertheinputfocusproducetheevents

whentheinputgainsfocusandcausedthethedocument

whentextvaluechange,producetheevents

whentexthighlightedandcausedthethedocument

Selectpathogenselectelements

implementationtochoosethecontrolelementsrolling.

Properties:

settheinformationwhensubmitinformation,thecorrespondingselectdocumentinthenameofthename.

Length:

selectdocumentofthecorrespondinglength

OnDuoGeoptionsofthearray

Selectindex;

Thesubscriptindicatethatoneoption

Selectineachofthefollowingproperties:

containingoptions

Text:

thecorrespondingcharacters.Options

Selected:

thatthecurrentoptionifitisselected

Index:

indicatethepositionofthecurrentoptions

Defaultselected:

thedefaultoption

whenselectoptionslosefocus,producethedocument.

Onfocas:

whenselectgainsfocus,producethedocument.

optionsafterchangesthestate,producetheevents.

Buttonbuttonwere

theimplementationforthecontrolofthebuttonbutton.

settheinformationwhensubmitinformationname,correspondingtodocumentthenamebutton.

Click()thismethodissimilartoapressthebutton.

Whenclickbuttonbuttononclickproducedwhentheevents.

button\"

testcall\"

onclick=tmyest()>

Document.Elements[0].Value=\"

mytest\"

//throughtheelementaccess

or

Document.Testcallvalue=\"

//throughthenameaccess

1.2.5checkboxcheckbox

theimplementationforahasthecheckboxofelementsincontrol.

settheinformationwhensubmitinformationname.

Checked:

thisattributespecifiesframe'

sstatetrue/falseonfailure.

Defauitchecked:

thedefaultstate

Click()themethodmakestheboxofacertainitemisselected.

Onclick:

whentheboxchoosewhenselected,producetheevents.

1.2.6radiowirelessbutton

implementationtohavearadiofunctionwirelessbuttoncontrol.

settheinformationwhensubmitinformation,correspondingtothenameoftheHTMLdocumentofthesamenameradio

tosettinginawindowinHTMLdocumentsofthecorrespondingvalueinformation,correspondingtothenameoftheHTMLdocumentradio.

theradiobuttonbuttonnumber.

Defalechecked:

thedefaultbutton.

thatornotselectedselected.

theselectedthelocationofthebutton.

Chick():

selectedabutton.

clickonthebutton,producetheevents.

1.2.7hidden:

hidden

theimplementationforahasnotshowtextandcaninputcharacterareaelementofthecontrol.

settheinformationwhensubmitinformationname,correspondingtothenameoftheHTMLdocumenthidden.

tosettinginawindowinHTMLdocumentsofthecorrespondingvalue,thecorrespondinginformationoftheHTMLdocumenthiddenvalue.

Defaleitvalue:

thedefaultvalue

1.2.8passwordpassword

theimplementationfortheelementsinthepasswordinputwithcontrol.

settheinformationwhensubmitinformationname,correspondingHTMLdocumentthenamepassword.

tosettinginawindowinHTMLdocumentsofthecorrespondingvalueinformation,correspondingHTMLdocumentthepasswordvalue.

Defaultvalu:

methods

highlightstheinputpasswordfield.

makeitlostpasswardtheinputfocus.

Focus():

getpasswordinputfocus.

1.2.9submitsubmitelements

theimplementationforasubmitbuttoncontrolwithfunction.

settheinformationwhensubmitinformationname,correspondingHTMLdocumentsubmit.

tosettinginawindowinHTMLdocumentsofthecorrespondingvalueinformation,thecorrespondingvalueinHTMLdocuments.

Click()isequivalenttopressthesubmitbutton.

Onclick()whenpressthisbutton,producetheevents.

1.3example

Belowwedemobyclickingonabutton(red)tochangecolorwindow,clickthe\"

calldynamicbuttondocument\"

calladynamicbuttondocument.

Test8_1HTM.

HTML>

head>

javascript\"

//theoriginalcolor

Document.Thebgcolor=\"

blue\"

Document.Vlinkcolor=\"

white\"

Document.Linkcolor=\"

yellow\"

Document.Alinkcol

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 小学教育 > 小升初

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1