本文档基于 CC协议(Creative Commons Share-Alike License)发布,是developer.mozilla.com, www.mozref.comwww.aptana.com共同劳动的成果。

with

Temporarily modifies the scope chain of a statement.

Syntax

with (object)
	statement 

Example

 with (document.forms.myForm) {
	firstName.value = "";
	lastName.value = "";
	email.value = "";
	} //Sets the values for these three form fields within a single block.