number47 Posted August 8, 2015 Share Posted August 8, 2015 I was going over some tutorial things, and attempting to make sense of the javascript language. Is there a good solid reason why you would want to use javascript to make the page display text that is able to be written with plain simple html <p> tag or something ? Link to comment Share on other sites More sharing options...
Ingolme Posted August 8, 2015 Share Posted August 8, 2015 You would if the page is interactive and the content changes based on user input. For example, making an error message show up on the page if a form field has invalid information. Link to comment Share on other sites More sharing options...
number47 Posted August 14, 2015 Author Share Posted August 14, 2015 anything else? would you use javascript for no particular reason if you only intended on a paragraph showing and not being directly interactive or seen to be. I notice sometimes, I copy over text with highlight as I read, Sometimes, It mixes the color of my ordinary higlight background and other times it changes it all together. It seems like I am getting swayed to make javascript state the text I wish to insert into a page. anything else for reasons why you might? Link to comment Share on other sites More sharing options...
davej Posted August 14, 2015 Share Posted August 14, 2015 If the text does not need to change dynamically then you would simply use HTML. This would have no effect on the way the text selection looks. 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