外文原文Word格式.docx
- 文档编号:18843103
- 上传时间:2023-01-01
- 格式:DOCX
- 页数:11
- 大小:20.43KB
外文原文Word格式.docx
《外文原文Word格式.docx》由会员分享,可在线阅读,更多相关《外文原文Word格式.docx(11页珍藏版)》请在冰豆网上搜索。
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
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 外文 原文
![提示](https://static.bdocx.com/images/bang_tan.gif)