+ 1

Brackets

hey guys whenever i close my brackets for instance like > it always then inputs </button> for some reason please reply

15th Dec 2016, 6:21 PM
Noah
Noah - avatar
8 Answers
+ 2
The editor is 'helping' you. It's about 50/50 whether it helps me though. The rule it's following is that all HTML tags should be closed, except some have different rules (like <br />... or <li> which can omit the closing tag).
15th Dec 2016, 6:29 PM
Kirk Schafer
Kirk Schafer - avatar
+ 1
Yeah, sometimes it seems to confuse the issue and I keep wanting to turn it off.
15th Dec 2016, 6:33 PM
Kirk Schafer
Kirk Schafer - avatar
+ 1
oh yeah, it 'helps' with quotes/double quotes too; I forgot. Remove the ' after alert.
15th Dec 2016, 6:36 PM
Kirk Schafer
Kirk Schafer - avatar
+ 1
Put all that on the [js] tab without the <script> tags. Worked for me. You can make it a function for the button if you want.
15th Dec 2016, 6:53 PM
Kirk Schafer
Kirk Schafer - avatar
0
well if its helping me it sure is doing a BS job LOL
15th Dec 2016, 6:31 PM
Noah
Noah - avatar
0
well i am writing a program let me send you the link
15th Dec 2016, 6:34 PM
Noah
Noah - avatar
0
i was gonna do a program like this inside it <script> var answer=prompt("Help santa!"); if(answer=="go home")alert("MERRY CHRISTMAS YOU FILFY ANIMAL"); if(answer=="Help santa")alert("YOU GOTTA PRESENT!"); else alert("A good night to all and to all a good night"); </script>
15th Dec 2016, 6:38 PM
Noah
Noah - avatar