vytas Posted January 26, 2007 Share Posted January 26, 2007 Can i pass a variable to html dom something like this.: <script type="text/javascript">var r = "Arial"document.getElementById('text').style.font-family=r</script> thx Link to comment Share on other sites More sharing options...
aspnetguy Posted January 26, 2007 Share Posted January 26, 2007 almost <script type="text/javascript">var r = "Arial"document.getElementById('text').style.fontFamily=r</script> in DOM you scrap the hyphen (-) and use camel case words Link to comment Share on other sites More sharing options...
vytas Posted January 26, 2007 Author Share Posted January 26, 2007 Ok i thought there whas something rong with the variable thx alot 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