<div id="hello">
<script>
const inp = "<img src='x' onerror ='alert(\"whoops, hacked!\")'>"
document.getElementById("hello").innerHTML = inp;
</script>
</div>This executes the code, and pops up an alert.
| class Component extends React.Component{ | |
| constructor(props) | |
| { | |
| super(props); | |
| this.state = {count:0}; | |
| } | |
| increment = () => | |
| { | |
| this.setState({count: this.state.count + 1}); |
| #include<stdio.h> | |
| #include<conio.h> | |
| #include<string.h> | |
| #include<stdlib.h> | |
| # define MAX 20 | |
| char str[MAX],stack[MAX]; | |
| int top=-1; | |
| void push(char c) | |
| { | |
| stack[++top]=c; |