Nope. You could save the value then recall it later. Also, as a point of information, since p.title is a string, it can only have the prototypical properties and functions of a string, like length, anchor(), etc. You cannot create a property for it - say p.title.defaultValue, like you could if it were an object. You could store its beginning value in another attribute for the element because the element is an object. HTML 5 is the most standard for doing something like that:
Code:
<p title="foo" id="p">Hello, world!</p>
<script>
var p = document.getElementById('p');
p.setAttribute('data-beginningTitle', p.title);
</script>
Once you have that much, you can access the original title of p anytime by:
Code:
p.getAttribute('data-beginningTitle');
Resetting it to its beginning value would be done like so:
Code:
p.title = p.getAttribute('data-beginningTitle');
But you could just as easily save the original value of p.title to a global variable or a property of some other object, or as a variable in some limited yet sufficient scope to achieve retrieval as needed.
Bookmarks