on 01-22-2014 2:13 AM
Dear Friends:
Happy new year .
I meet a technical problem in script , I would like to dynamically set border color in script .
Ex.
Top and bottom border set blue
Left and right border set red
I am aware of the property of "bordercolor" what can set border color , but it is for whole border in same color .
Is there other object and property for border color individually setting in script? Please help .thanks a lot .
Hi Benjamin,
where is your problem.
You can choose the coler for all sides in one step, or set the style for every side.
Here is an example
document.getElementById("ex1").style.borderLeft="thick solid #0000FF";
--> How the Syntax work:
object.style.borderLeft="width style color"
So, just work trough the official documentation.
Regards
Florian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Rather than using borderColor, please try with border.edge.color.value. Following is an example in formcalc:
$.border.edge[0].color.value = "255,0,0"
$.border.edge[1].color.value = "0,255,255"
$.border.edge[2].color.value = "255,0,0"
$.border.edge[3].color.value = "0,255,255"
In above example 0 is the top edge followed by edge sequence in clockwise rotation. So your output will have top and bottom edges as red and right and left edges as blue.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.