下载
加入VIP
  • 专属下载特权
  • 现金文档折扣购买
  • VIP免费专区
  • 千万文档免费下载

上传资料

关闭

关闭

关闭

封号提示

内容

首页 Firefox Firebug使用文档

Firefox Firebug使用文档.doc

Firefox Firebug使用文档

吇甴呼晞900
2018-09-30 0人阅读 举报 0 0 暂无简介

简介:本文档为《Firefox Firebug使用文档doc》,可适用于IT/计算机领域

FirefoxFirebug使用文档FirebugDocumentFIREBUGDOCUMENTCOMMANDLINEAPICONSOLEAPIconsolelog(object,object,)consoledebug(object,object,)consoleinfo(object,object,)consolewarn(object,object,)consoleerror(object,object,)consoleassert(expression,object,)consoledir(object)consoledirxml(node)consoletrace()consolegroup(object,object,)consolegroupCollapsed(object,object,)consolegroupEnd()consoletime(name)consoletimeEnd(name)consoleprofile(title)consoleprofileEnd()consolecount(title)IMPLEMENTATIONNOTESFirebugFirebugFirebugFirebugandearlierKEYBOARDANDMOUSESHORTCUTSGlobalHTMLTabHTMLEditorHTMLInspectModeScriptTabDOMTabDOMandWatchEditorCSSTabCSSEditorLayoutTabLayoutEditorCommandLine(small)CommandLineAPITheFirebugcommandlineprovidesthesespecialfunctionsforyourconvenience:$(id)Returnsasingleelementwiththegivenid$$(selector)ReturnsanarrayofelementsthatmatchthegivenCSSselector$x(xpath)ReturnsanarrayofelementsthatmatchthegivenXPathexpressiondir(object)PrintsaninteractivelistingofallpropertiesoftheobjectThislooksidenticaltotheviewthatyouwouldseeintheDOMtabdirxml(node)PrintstheXMLsourcetreeofanHTMLorXMLelementThislooksidenticaltotheviewthatyouwouldseeintheHTMLtabYoucanclickonanynodetoinspectitintheHTMLtabcd(window)Bydefault,commandlineexpressionsarerelativetothetoplevelwindowofthepagecd()allowsyoutousethewindowofaframeinthepageinsteadclear()Clearstheconsoleinspect(object,tabName)Inspectsanobjectinthemostsuitabletab,orthetabidentifiedbytheoptionalargumenttabNameTheavailabletabnamesare"html","css","script",and"dom"keys(object)Returnsanarraycontainingthenamesofallpropertiesoftheobjectvalues(object)Returnsanarraycontainingthevaluesofallpropertiesoftheobjectdebug(fn)Addsabreakpointonthefirstlineofafunctionundebug(fn)Removesthebreakpointonthefirstlineofafunctionmonitor(fn)Turnsonloggingforallcallstoafunctionunmonitor(fn)TurnsoffloggingforallcallstoafunctionmonitorEvents(object,types)TurnsonloggingforalleventsdispatchedtoanobjectTheoptionalargumenttypesmayspecifyaspecificfamilyofeventstologThemostcommonlyusedvaluesfortypesare"mouse"and"key"Thefulllistofavailabletypesincludes"composition","contextmenu","drag","focus","form","key","load","mouse","mutation","paint","scroll","text","ui",and"xul"unmonitorEvents(object,types)Turnsoffloggingforalleventsdispatchedtoanobjectprofile(title)TurnsontheJavaScriptprofilerTheoptionalargumenttitlewouldcontainthetexttobeprintedintheheaderoftheprofilereportprofileEnd()TurnsofftheJavaScriptprofilerandprintsitsreportConsoleAPIFirebugaddsaglobalvariablenamed"console"toallwebpagesloadedinFirefoxThisobjectcontainsmanymethodsthatallowyoutowritetotheFirebugconsoletoexposeinformationthatisflowingthroughyourscriptsconsolelog(object,object,)WritesamessagetotheconsoleYoumaypassasmanyargumentsasyou'dlike,andtheywillbejoinedtogetherinaspacedelimitedlineThefirstargumenttologmaybeastringcontainingprintflikestringsubstitutionpatternsForexample:consolelog("Thesjumpedoverdtallbuildings",animal,count)Theexampleabovecanberewrittenwithoutstringsubstitutiontoachievethesameresult:consolelog("The",animal,"jumpedover",count,"tallbuildings")ThesetwotechniquescanbecombinedIfyouusestringsubstitutionbutprovidemoreargumentsthantherearesubstitutionpatterns,theremainingargumentswillbeappendedinaspacedelimitedline,likeso:consolelog("IamsandIhave:",myName,thing,thing,thing)Ifobjectsarelogged,theywillbewrittennotasstatictext,butasinteractivehyperlinksthatcanbeclickedtoinspecttheobjectinFirebug'sHTML,CSS,Script,orDOMtabsYoumayalsousetheopatterntosubstituteahyperlinkinastringHereisthecompletesetofpatternsthatyoumayuseforstringsubstitution:StringSubstitutionPatternssStringd,iInteger(numericformattingisnotyetsupported)fFloatingpointnumber(numericformattingisnotyetsupported)oObjecthyperlinkconsoledebug(object,object,)Writesamessagetotheconsole,includingahyperlinktothelinewhereitwascalledconsoleinfo(object,object,)Writesamessagetotheconsolewiththevisual"info"iconandcolorcodingandahyperlinktothelinewhereitwascalledconsolewarn(object,object,)Writesamessagetotheconsolewiththevisual"warning"iconandcolorcodingandahyperlinktothelinewhereitwascalledconsoleerror(object,object,)Writesamessagetotheconsolewiththevisual"error"iconandcolorcodingandahyperlinktothelinewhereitwascalledconsoleassert(expression,object,)TeststhatanexpressionistrueIfnot,itwillwriteamessagetotheconsoleandthrowanexceptionconsoledir(object)PrintsaninteractivelistingofallpropertiesoftheobjectThislooksidenticaltotheviewthatyouwouldseeintheDOMtabconsoledirxml(node)PrintstheXMLsourcetreeofanHTMLorXMLelementThislooksidenticaltotheviewthatyouwouldseeintheHTMLtabYoucanclickonanynodetoinspectitintheHTMLtabconsoletrace()PrintsaninteractivestacktraceofJavaScriptexecutionatthepointwhereitiscalledThestacktracedetailsthefunctionsonthestack,aswellasthevaluesthatwerepassedasargumentstoeachfunctionYoucanclickeachfunctiontotakeyoutoitssourceintheScripttab,andclickeachargumentvaluetoinspectitintheDOMorHTMLtabsconsolegroup(object,object,)WritesamessagetotheconsoleandopensanestedblocktoindentallfuturemessagessenttotheconsoleCallconsolegroupEnd()toclosetheblockconsolegroupCollapsed(object,object,)Likeconsolegroup(),buttheblockisinitiallycollapsedconsolegroupEnd()Closesthemostrecentlyopenedblockcreatedbyacalltoconsolegroup()orconsolegroupEnd()consoletime(name)CreatesanewtimerunderthegivennameCallconsoletimeEnd(name)withthesamenametostopthetimerandprintthetimeelapsedconsoletimeEnd(name)Stopsatimercreatedbyacalltoconsoletime(name)andwritesthetimeelapsedconsoleprofile(title)TurnsontheJavaScriptprofilerTheoptionalargumenttitlewouldcontainthetexttobeprintedintheheaderoftheprofilereportconsoleprofileEnd()TurnsofftheJavaScriptprofilerandprintsitsreportconsolecount(title)WritesthenumberoftimesthatthelineofcodewherecountwascalledwasexecutedTheoptionalargumenttitlewillprintamessageinadditiontothenumberofthecountImplementationNotesTheconsoleisanobjectattachedtothewindowobjectinthewebpageInFirebugforFirefoxtheobjectisattachedonlyiftheConsolepanelisenabledInFirebuglite,theconsoleisattachedifLiteisinstalledinthepageFirebugTheconsoleisimplementedbyaddingadivelementandascripttagtothewebpagejustbeforethefirstJavascriptscripttagisrunSothefirstscripttagiscompiled,thentheconsoleisinjected,thentheouterfunctioncodeofthescripttagisexecutedFirebugAsinFirebugFirebugThecodeandtagsareaddedondocumentloadeventFirebugandearlierTheconsoleisimplementedwithaninsecuretechniqueKeyboardandMouseShortcutsGlobalOpenFirebugPanelFCloseFirebugPanelFOpenFirebuginWindowCtrlFSwitchtoPreviousTabCtrl`FocusCommandLineCtrlShiftLFocusSearchBoxCtrlShiftKToggleInspectModeCtrlShiftCToggleJavaScriptProfilerCtrlShiftPReExecuteLastCommandLineCtrlShiftEHTMLTabEditAttributeClickonnameorvalueEditTextNodeClickontextEditElementDoubleClicktagnameNextNodeinPathCtrlPreviousNodeinPathCtrl,HTMLEditorFinishEditingReturnCancelEditingEscAdvancetoNextFieldTabAdvancetoPreviousFieldShiftTabHTMLInspectModeCancelInspectionEscInspectParentCtrlUpInspectChildCtrlDownScriptTabContinueFCtrlStepOverFCtrl'StepIntoFCtrlStepOutShiftFCtrlShiftToggleBreakpointClickonlinenumberDisableBreakpointShiftClickonlinenumberEditBreakpointConditionRightClickonlinenumberRuntoLineMiddleClickonlinenumberCtrlClickonlinenumberNextFunctiononStackCtrlPreviousFunctiononStackCtrl,FocusMenuofScriptsCtrlSpaceFocusWatchEditorCtrlShiftNDOMTabEditPropertyDoubleClickonemptyspaceNextObjectinPathCtrlPreviousObjectinPathCtrl,DOMandWatchEditorFinishEditingReturnCancelEditingEscAutocompleteNextPropertyTabAutocompletePreviousPropertyShiftTabCSSTabEditPropertyClickonpropertyInsertNewPropertyDoubleClickonwhitespaceFocusMenuofStyleSheetsCtrlSpaceCSSEditorFinishEditingReturnCancelEditingEscAdvancetoNextFieldTabAdvancetoPreviousFieldShiftTabIncreaseNumberbyOneUpDecreaseNumberbyOneDownIncreaseNumberbyTenPageUpDecreaseNumberbyTenPageDownAutocompleteNextKeywordUpAutocompletePreviousKeywordDownLayoutTabEditValueClickonvalueLayoutEditorFinishEditingReturnCancelEditingEscAdvancetoNextFieldTabAdvancetoPreviousFieldShiftTabIncreaseNumberbyOneUpDecreaseNumberbyOneDownIncreaseNumberbyTenPageUpDecreaseNumberbyTenPageDownCommandLine(small)AutocompleteNextPropertyTabAutocompletePreviousPropertyShiftTabExecuteReturnInspectResultShiftReturnOpenResult'sContextMenuCtrlReturnCommandLine(large)ExecuteCtrlReturn

用户评价(0)

关闭

新课改视野下建构高中语文教学实验成果报告(32KB)

抱歉,积分不足下载失败,请稍后再试!

提示

试读已结束,如需要继续阅读或者下载,敬请购买!

文档小程序码

使用微信“扫一扫”扫码寻找文档

1

打开微信

2

扫描小程序码

3

发布寻找信息

4

等待寻找结果

我知道了
评分:

/14

Firefox Firebug使用文档

VIP

在线
客服

免费
邮箱

爱问共享资料服务号

扫描关注领取更多福利