RawrRawrRob Posted January 26, 2013 Share Posted January 26, 2013 Hello, I'm new to JavaScript and I'm trying to use JavaScript for my website. I want to have a sample sentence, where you can select the font family it is in and then you can also click on a size option to change the display size for the font. I've tried to get this to work for a while but just can seem to do it! If anyone can help it will be greatly appreciated! Link to comment Share on other sites More sharing options...
jeffman Posted January 26, 2013 Share Posted January 26, 2013 (edited) Everything you need to know about changing the style is here. Check the syntax example at the top, then scroll down to see the text properties. Edited January 26, 2013 by Deirdre's Dad Link to comment Share on other sites More sharing options...
RawrRawrRob Posted January 28, 2013 Author Share Posted January 28, 2013 Everything you need to know about changing the style is here. Check the syntax example at the top, then scroll down to see the text properties. Thank you! Link to comment Share on other sites More sharing options...
xhtmlchamps1 Posted January 31, 2013 Share Posted January 31, 2013 Hello, I'm new to JavaScript and I'm trying to use JavaScript for my website. I want to have a sample sentence, where you can select the font family it is in and then you can also click on a size option to change the display size for the font. I've tried to get this to work for a while but just can seem to do it! If anyone can help it will be greatly appreciated! document.getElementById("id").style.property="value"in the place of property replace with "font-family or font-size"by using jquery your requirement can be possible more easily. 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