金凌虹离开新东方:JavaScript editing

来源:百度文库 编辑:九乡新闻网 时间:2024/07/08 16:23:52

One of the most important features is a unique library containing over 200 ready-to-use controlled scripts and in addition, over 700 not controlled scripts for professionals!

Features that make JavaScript editing in 1st JavaScript Editor very flexible:

Built-in JavaScript Debuggerwill allow you run and debug the code, one line at a time, and eachtime, either adding extra code on the fly (without editing the originalfile), or checking how variables change in the run of the program. Youcan debug JavaScript files, Web pages which contain embedded scripts oreven selected text (if it is JavaScript).

Unified color-coded syntax- for JavaScript, HTML, PHP, VBScript, CSS, ASP(Net). You canimmediately identify comments, functions, object, methods and otherelements. Color also helps you with potential problems, for exampleAlert('hi') and alert('hi') is not the same thing in JavaScript.

Ability to experiment - unlimited (customizable) Undo and Redo are only one click away.

Save time by loading your recent files automatically next time you run the program.

Single-click navigation between documents using document tabs.

Go to declaration:

Navigation to a declaration has beenextended in First JavaScript Editor, and now (in addition to functions,variables, etc.) it is also supported for JavaScript labels.

Use the Ctrl + Click combination and this will immediately navigate you to the line of code where the label, function or variable is declared.

Line numbers and word-wrap. Optionally, you can have line numbers and word-wrap displayed

Highlighting matching curly braces. There are two ways to highlight:
by placing caret before brace
by placing mouse over curly brace
So you are able to highlight two pairs of matching curly braces at the same time!!!

Block Comments. You can comment a section of JavaScript code by selecting the code in the Code Editor and pressing CTRL+/ (slash). Each line of the selected code is prefixed with //.
Pressing CTRL+/ will add or remove the slashes, based on whether the first line of the code is prefixed with //.

Press [CTRL+/] to comment selected text



or uncomment selected text

1st JavaScript Editor uses Intellisense to simplify writing of code and make it more error-free.
IntelliSenseprovides an array of options that make language references easilyaccessible. It works by monitoring your keystrokes and offeringpick-lists with member functions, methods and properties. When coding,you do not need to leave the code editor to perform searches on languageelements.

You can keep your context, find the informationyou need, insert language elements directly into your code, and evenhave IntelliSense complete your typing for you.

There are three patterns of IntelliSense in First JavaScript Editor:

CSS IntelliSense

There are two ways to use Intellisense in CSS section of HTMLdocument (beetween tags) or in CSSdocument:

  1. Press SPACE or ENTER to get IntelliSense.
  2. Place cursor on ready property and press Ctrl+SPACE.

HTML IntelliSense

There are five ways to use Intellisense in HTML document:

  1. Press "<" to produce IntelliSense for HTML tags.
  2. Place cursor on HTML tag and press Ctrl+SPACE.
  3. Press SPACE to produce IntelliSense for HTML properties or events.
  4. Place cursor on HTML property or event and press Ctrl+SPACE.
  5. Place cursor on Value and press Ctrl+SPACE.
Note, each HTML tag and attribute has own IntelliSense!

JavaScript IntelliSense

There are twelve ways to use Intellisense in JavaScript section ofHTML document (beetween tags) or inJavaScript document:

  1. Press Ctrl+SPACE to get IntelliSense.
  2. After entering a property or object, type dot " . ".
  3. Place cursor on ready property, object or method and press Ctrl+SPACE.
  4. Write method, which has some parameters, and type bracket "(".
  5. To get IntelliSense for functions and statements press Ctrl+J.
    To get autocompletion, type the first letters of statement (for example for function type func) and press Ctrl+J.
  6. Intellisense removes now the need to memorize thousands of functions, objects, members, and properties.
    It constantly monitors your keystrokes (no longer waits for '.' to be typed) to assist you with pick-lists of JavaScript and user-created objects.
    Just type the first two letters of your object to get IntelliSense. You can disable this feature by unchecking the "AutoIntellisense" option in then Preferences dialog.
  7. JavaScript Editor can now recognize user-created objects and give you Intellisense for only this type of object.
  8. Place mouse over a method or object, which has some parameters and First JavaScript Editor gives you hint with description of this method.

  9. Now you can create your own classes and program can recognize properties and methods for your classes.
  10. Each time you use the "getElementById" method, you must check the HTML file to see what the exact ID is. JavaScript Editor helps in this task by inspecting HTML file and suggesting a list of ID's.

  11. When you use "getElementById" method, JavaScript Editor can recognize HTML tag and propose exact IntelliSenses for that tag.
  12. And even more! You can now create variable, which is assigned to some ID element and use it with exact IntelliSenses for that tag.

Context-sensitive help : just press Shift + F1to receive help on the function, method, property or any word under thecursor. Without this, you would have an impossible task of memorizinghundreds of functions you can call and the parameters you can pass tothem.

Bookmarking for easy and fast navigation.

Find functions and variables in your documents easily - they are automatically listed.
The application finds the function or variable, scrolls to it and marks it.
There are three ways to sort functions and variables: ascending, descending and none.


Code formatter.If you use some codes from external sources with different codingstyles and standards you probably know how it is hard to read andmaintain these codes.

To help you in this matter, 1st JavaScript Editor has an excellent source code formatter / beautifier, which allows you to customize and apply any style you want.

You can format embedded JavaScript code (any webfile), pure JavaScript (JS file) or selected text (don't forget toselect only JavaScript!).

Add files tab.
This tab allows you to add any file(s) to any project.
What is it used for?
When you edit, for example, JavaScript file you have not access tofunctions, variables, classes and so on, located in other files.
So you cannot get all power of IntelliSense, dynamic hints and "go to declaration" feature.
By adding files to project you have all access to content of checked files.
You can remove any file from project by clicking Remove button. You canalso temporary exclude any file(s) by unchecking corresponding checkbox.
Note, adding of files can cause significant slowing down of IntelliSense!

Clipboard panel allows you to get all clipboard copy actions (up to 30).
You can define the limit from Preferences dialog.
To insert a clipboard content double-click or drag & drop to active window.

Usages highlighting.

If you are interested in usages of any JavaScript word in the current document, try the Ctrl + Shift + F11 shortcut. All usages will be highlighted.

Using F11 and Shift + F11 you can quickly navigate highlighted usages back and forth. Pressing ESC you can unhighlight highlighted usages. You can access all these actions via menu EDIT --> USAGES.

Now you can use First JavaScript Editor with other HTML editors (f.e. Dreamweaver or Front Page)You simply open your document with both tools. Whenever you save thepage in Dreamweaver, 1st JavaScript Editor proposes you to re-load it.This makes it easy to switch between visual editing and writing code.


Have your script error-free code in record time.Unless your code is very simple, it usually has typing and othererrors. How to you find them and correct them? Without the right tools,this is a doubting task that can take up most of your time. It is notuncommon to spend 10% of time coding new features, and 90% chasingerrors !

1st JavaScript Editor includes unique tools that allow you to avoid the bug-finding frustration and focus on development instead of wasting your time:

Up until now the only way to hunt errors in your code was to run itin a web browser, then navigate to the offending line number. You nolonger need to waste your time:

Click on the HTML Syntax Check button
It will check html syntax for current document and displays the result in the "Output window".

Click on the JavaScript Syntax Check button
It will check JavaScript syntax for current document and displays the result in the "Output window".


In addition, you can easily check "JavaScript islands" in your HTMLcode: just use the mouse to highlight the code, and click on JavaScriptSyntax Check.

Run any piece of JavaScript code with one click
How does it work? This is a case when an example goes a long way:
Have a look at a simple example below:

When you click on the Execute button (or press F2),the interpreter built into 1st JavaScript Editor runs the code andraises some messages or displays the result of the write function in the"Output window":

Calling any JavaScript functions either from document or from browser.


This feature allows you to:
      - Call any JavaScript function straight from 1st JavaScript Editor
      - Pass parameters to it, and
     - Observe the result in "Output window" or by getting messages.

Type-in templates, for JavaScript functions and statements,are reusable chunks of code which at least double your coding speed .Just type the first few letters of the template and press Ctrl+J : this will pop a list with all the matching templates:

Publish your colored code with ease.
When you publish your code on the Internet or elsewhere, it is agood idea to preserve the color coding and formatting. It makes yourJavaScript code much easier to read and understand.

To this aim, use First JavaScript Editor to export your files:
As web pages, for placing them on the Internet, or as RTF files, for use in Microsoft Word or other text processors.

Previewing using multiple browsers:Now you can add or remove any (quantity of) browser located in yourcomputer to "Browser List", to preview an HTML page from FirstJavaScript Editor.

Editing a source code outside First JavaScript Editor using multiple editors:Now you can add or remove any (quantity of) editors located in yourcomputer to "Editors List", to edit code outside 1st JavaScript Editor.