function showToolTip() { document.getElementById("tooltip").textContent = "I am tooltip text"; } function hideToolTip() { document.getElementById("tooltip").textContent = ""; }
<body> <button disabled onmouseover="showToolTip()" onmouseout="hideToolTip()"> I am disabled </button> <br> <span id="tooltip"></span> </body>