<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'>
HTMLInputElement.prototype.MyValue = function() {
return this.value + this.value;
};
window.onload = function() {
var input = document.getElementById("i");
console.log(input.MyValue());
};
</script>
</head>
<body>
<input type="text" value="a" id="i" />
</body>
</html>