开发者

Changin a div border with javascript

开发者 https://www.devze.com 2022-12-12 00:43 出处:网络
I have created a div programaticaly using. var Element; Element = document.createElement(\'div\'); Now I want to change the right and bottom border to \"#CCCCCC 1px solid\".

I have created a div programaticaly using.

var Element;
Element = document.createElement('div');

Now I want to change the right and bottom border to "#CCCCCC 1px solid".

I don't want to use a library for this and using CSS clas开发者_运维问答ses is not possible.


element.style.borderRight = element.style.borderBottom = "#CCCCCC 1px solid";


Element.setAttribute("style", "bottom-right: #CCCCCC 1px solid"); ?
0

精彩评论

暂无评论...
验证码 换一张
取 消