Fire Dragon Posted January 20, 2006 Share Posted January 20, 2006 Yeah,I have very stupid question,but I can't find this anywhere!OK,so how I can put comments in javascript?I tried // and some others,but it only writes them to browser window.HEEEEEEEEEEELP! Link to comment Share on other sites More sharing options...
Chocolate570 Posted January 20, 2006 Share Posted January 20, 2006 /* to open and */ to close multi-block comments.//does one line comments. Link to comment Share on other sites More sharing options...
Fire Dragon Posted January 21, 2006 Author Share Posted January 21, 2006 /* to open and */ to close multi-block comments.//does one line comments.<{POST_SNAPBACK}> Sorry,but I tried them allready,and my comments appears to html document too.BTW,can I place it in head?It is there,and I only guess... Link to comment Share on other sites More sharing options...
scott100 Posted January 21, 2006 Share Posted January 21, 2006 What chocolate570 told you should work perfectly, did you use script tags, see below, btw you can put javascript in either the head or body of a page<html><head><script>//i am a single line comment/* I am a multi line comment */</script></head><body></body></html> Link to comment Share on other sites More sharing options...
Fire Dragon Posted January 22, 2006 Author Share Posted January 22, 2006 Ah!Now I understand why them won't work!I don't know that they need <script> tags.Thanks! Link to comment Share on other sites More sharing options...
Chocolate570 Posted January 23, 2006 Share Posted January 23, 2006 Lol. For the HTML comments, use <!-- and --> Link to comment Share on other sites More sharing options...
Eric Posted January 23, 2006 Share Posted January 23, 2006 What chocolate570 told you should work perfectly, did you use script tags, see below, btw you can put javascript in either the head or body of a page<html><head><script type="text/javascript">//i am a single line comment/* I am a multi line comment */</script></head><body></body></html><{POST_SNAPBACK}> There should be a TYPE attribute to let the browser know what kind of "script" it is.SCRIPT by itself can be ANY kind of script.Look at the bold red I added what you forgot. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now