0
我有以下的脚本询问了pin号码,它被加密为md5,但是当我输入任何值时,它应该只对1234或4321进行操作,我必须运行2不同的if语句就像从数据库中获取pin号并使用PHP的foreach语句将它们回显出来一样。Javascript hex_md5 pin number
<script>
function pinSave()
{
var validate=prompt("Enter your PIN","Enter your PIN");
if (validate != '' && validate != null) {
if (hex_md5(validate) == '81dc9bdb52d04dc20036dbd8313ed055')
return true;
else
{
alert('The PIN you entered is not correct.');
return false;
}
if (hex_md5(validate) == 'd93591bdf7860e1e4ee2fca799911215')
return true;
else
{
alert('The PIN you entered is not correct.');
return false;
}
} else {
return false;
}
}
在PHP脚本中编码为JSON。在JavaScript中解码为JSON。把它们放在一个数组中。在数组中查找它们。 – 2010-12-18 04:33:32
你似乎患有RAD疾病 – 2013-07-26 18:27:06