javascript hexadecimal and binary conversion methods

  • 2020-06-07 04:01:09
  • OfStack

An example of javascript106 and 2 is given in this paper. Share to everybody for everybody reference. Specific implementation methods are as follows:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>js Hexadecimal conversion </title>
<script>
var x=333;
document.write(" convert 16 Into the system is :"+x.toString(16));
document.write(" convert 2 Into the system is :"+x.toString(2));
</script>
</head>
<body>
</body>
</html>

Hopefully, this article has been helpful in your javascript programming.


Related articles: