0

can we apply css to a variable in Javascript??..if yes how?..pls explain

Example:var name=promt("Your name"); //in script part now can we apply css in that var name??

6th Feb 2019, 8:07 PM
[ ]
[     ] - avatar
5 Answers
+ 2
What you mean for "apply css to variable in javascript"? Css is applied to html elemtents only...
6th Feb 2019, 8:14 PM
KrOW
KrOW - avatar
+ 2
You are welcome but can you explain in practical way what you wanted get?
6th Feb 2019, 8:18 PM
KrOW
KrOW - avatar
+ 1
thanks KrOW
6th Feb 2019, 8:16 PM
[ ]
[     ] - avatar
+ 1
I continue to not understand what you wanted to get... Maybe you want know how make an text editor with highlight feature like on SL?
6th Feb 2019, 8:51 PM
KrOW
KrOW - avatar
0
actually i was asking that can we add animations to scripting element....but as u said it that css only works on html elements like if i write <div class ="d"></div> .d{..some code..}..can be used ....but can we use the same for javascripts like .name { }or .var name .....
6th Feb 2019, 8:26 PM
[ ]
[     ] - avatar