This is my div:
By Color
As I said in the comments, a I suggest using HTML5 in which case you could access it using:value
attribute. Although (very) bad, it can be accessed as:
console.log(document.getElementById('demo').getAttribute);
data-*
attributes rather. Something like this:element.getAttribute('data-myValue');
//Or using jQuery:
$('#demo').data('myValue');