Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Set A Function For An Element

function x()
{
let btn =	document.getElementById("btn");
 btn.on = function()
{
	console.log("XXXXXXSS");
}
	btn.on();	
}
      </script>  
  </head>
  <body>
<button id="btn" onclick="x()">Press </button>
</body>
 
PREVIOUS NEXT
Tagged: #Set #A #Function #For #An #Element
ADD COMMENT
Topic
Name
3+7 =