Ok to answer this . I simply converted my <
and the >
to <
and >
. What was happening previously is i used to set the text <script>alert('1')</script>
but before setting the text in the input text browserconverts <
and >
as <
and the >
. So hence converting them again to <
and >
since browser will understand that as only tags and converts them , than executing the script inside <input type="text" />