Hi, I am trying to find a way to convert the Color object to #xxxxxx format. I use the obj.css("color") to get the the Color object. First I tried to get an Number value, but failed to Google it out. Then I tried to parse it as a string, but IE and Firefox has different explanantion on the toString of Color object: --- IE gives #xxxxxx --- Firefox gives RGB(xx,xxx,xx) I don't know how other browser's behavior on this yet, so using "if...else..." will be at risk.
Is there a nice way to do this? -- 代码发芽网: http://www.fayaa.com/code/ (无需插件在blog上贴语法高亮的代码,百种语言,多种配色) 我的Blog: http://www.2maomao.com/blog