i am making a text adventure game and i was wondering if i could some how change the color of text then put that text in a var with other text and output it some how so it keeps its color sort of like this
var a = "red text "
var b = "blue text "
var c = "greentext "
var all = a + b + c
red text blue text green text
i hope you understand what i mean
07-09-2013, 01:53 PM
var a ="<span style='color:red'>red text </span>";
var b ="<span style='color:blue'>blue text </span>";
TODO: improve (style = css class,...)
07-09-2013, 03:02 PM
o cool thank it worked :D
i can even use it like this :D
var A = redtext
var all = "<span style='color:red'>" + A + "</span>"