继承人我简单的HTML源JavaScript作为一种病毒?....源编辑
<html>
<head>
<title>
Dec2Bin
</title>
<script type="text/javascript">
function app() {
var decimal = prompt("Numero en Decimal");
alert("El numero " + decimal + " en codigo binario es igual a " + dec2bin(decimal));
}
function dec2bin(decimal) {
var binario = "";
while (decimal != 0) {
if (decimal % 2 == 0) {
binario += "1";
}
else {
binario += "0"
}
decimal = decimal/2
}
return binario;
}
</script>
</head>
<body>
<input type="button" onclick="app()" value="Procesar" />
</body>
</html>
魅力不断告诉我它是一种病毒..如果我删除它停止的JavaScript ...我该怎么办?
'number.toString(2)':-) – CMS 2009-11-12 07:17:31