VIDEO 46 BIND JS
Wed Jan 15 2025 16:36:17 GMT+0000 (Coordinated Universal Time)
Saved by
@E23CSEU1151
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>REACT</title>
</head>
<body>
<BUTTON> button clicked </BUTTON>
<!---bind keyword ued in javascript -->
</body>
<script>
class
{
constructor (){
this.library = "REACT"
this.server = "http//jnvnvnf"
document
.querySelector('button')
.addEventListener('click',this.handleclicked.
bind(this))/// bind is used to access this server to get all the refereneces
handleclicked()
{
console.log("button clicked");
console.log(this.server);
}
}
}
</script>
</html>
content_copyCOPY
Comments