Answer the question
In order to leave comments, you need to log in
How to convert the expression PS I am writing a calculator???
Hello!
I am writing a calculator in js, and the first problem arose.
The code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>JavaScript</title>
<script src="jsLessons.js"></script>
</head>
<body>
<input type="text" id="text" onchange="calcFunc(this.value)">
<input type="button" value="Кнопка" id="button">
</body>
</html>
function calcFunc(newS){
alert(parseInt(newS));
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question