Get border width from a div with plain javascript

Please try the below javascript:

alert($("#content").css("border-left-width")); //using jquery.

or

alert(getComputedStyle(document.getElementById('content'),null).getPropertyValue('border-left-width'));//without jquery.

getComputedStyle(element, pseudo)

element:The element to get a styling for

pseudo:A pseudo-selector like ‘hover’ or null if not needed.

Reference link: http://javascript.info/tutorial/styles-and-classes-getcomputedstyle

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)