This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function change(){ | |
let a=document.getElementById('a').value | |
let b=document.getElementById('b').value | |
let c=document.getElementById('c').value | |
if(parseInt(a).toString()!=a||parseInt(b).toString()!=b||parseInt(a).toString()!=c){ | |
document.getElementById("d").innerHTML="숫자만 입력해주세요" | |
return 0 | |
} | |
let d=parseInt(a,b).toString(c) | |
document.getElementById("d").innerHTML=d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function change(){ | |
let a=document.getElementById('a').value | |
let b=document.getElementById('b').value | |
let c=document.getElementById('c').value | |
if(parseInt(a).toString()!=a||parseInt(b).toString()!=b||parseInt(a).toString()!=c){ | |
document.getElementById("d").innerHTML="숫자만 입력해주세요" | |
return 0 | |
} | |
let d=parseInt(a,b).toString(c) | |
document.getElementById("d").innerHTML=d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input id="a" type="text" />진법 수 <input id="b" type="text" />를 <input id="c" type="text" />진법 수로 변환 | |
<button onclick="change()">변환</button> | |
결과: <span id="d"></span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input id="a" type="text" />진법 수 <input id="b" type="text" />를 <input id="c" type="text" />진법 수로 변환 | |
<button onclick="change()">변환</button> | |
결과: <span id="d"></span> |