Jump to content

Double or Single quotes?


Videogamer555

Recommended Posts

I found this sample Javascript on another site:

<script language="JavaScript">// open a new windowwindow.open("http://localhost", "new","width=480,height=640,toolbar=no,resizable=no,menubar=no,location=no,status=no,directories=no");</script>

I noticed that it used double quotes in the Javascript, when normally double quotes are used in HTML, but single quotes are usually what I've seen used in Javascript. So which is correct? Is this sample "technically" wrong by the Javascript standard? Or are both types of quotes equally valid?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...