0
The addition of two numbers and display the substring of a string using javascript
2 ответов
0
<html>
<body>
<script>
var hexValue = "1";
var hexValue2= " 10";
var res = parseInt(num1) + parseInt(num2) ;
hexValue + hexValue2;
hexValue = "0x" + hexValue;
hexValue2 = "0x" + hexValue2;
hexValue = parseInt(hexValue , 16);
hexValue2= parseInt(hexValue2 , 16);
hexValue = hexValue + 0x010101;
hexValue2 = hexValue2 + 0x010101;
res = res.toString(16);
document.write(hexValue);
</script>
</body>
</html>
- 1
Output