how to change the style of the body in react code example
Example 1: how to change the title of the console in c#
Console.Title = "Insert Console title";
Example 2: how to get the value in a tag in react
import React, { Component } from 'react';
class App extends Component {
constructor(props) {
super(props);
this.handleClick = this.handleClick.bind(this);
}
handleClick = (event) => {
alert(event.target.innerText);
alert(event.target.tagName);
}
render() {
return (
<div>
<div className="text-center">
<button className="btn btn-secondary" onClick={this.handleClick}>
Click Me
</button>
</div>
</div>
);
}
}
export default App;