How to use parseInt , eval , in javascript
<script>
function fun1()
{
x="dev"
y=8786
alert(parseInt(x)+y)
}
</script>
<body>
<input type="button" value="click" onclick="fun1()">
</body>
<script>
function create_function()
{
x="200+788"
alert(eval(x))
}
</script>
<body>
<input type="button" value="click" onclick="create_function()">
</body>
<script>
function fun1()
{
x="dev"
y=8786
alert(parseInt(x)+y)
}
</script>
<body>
<input type="button" value="click" onclick="fun1()">
</body>
<script>
function create_function()
{
x="200+788"
alert(eval(x))
}
</script>
<body>
<input type="button" value="click" onclick="create_function()">
</body>
How to use parseInt , eval , in javascript
0 comments: