function GetValueForToolTip(obj) {
var tValue = obj.innerText;
obj.setAttribute("title", tValue);
}
<td width="25%" οnmοuseοver='GetValueForToolTip(this)'>HaHa</td>
<button id="hahaBtn" οnmοuseοver="'GetValueForToolTip(this);">HaHa Button</button>