I want:
if (window.XMLHttpRequest)
{
//do some
}
but after formatting I get:
if (window.XMLHttpRequest) {
}
how can I correct it?
This is probably not what you want, but I suggest keeping it as is.
It is also recommended by the Google Javascript Style Formatting Guide
In the menu:
Tools -> Options -> Text Editor -> JScript -> Formatting -> New Lines
However, I agree with epoch - it's probably better to just follow the style guide.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.