我有一个.js
包含这两个功能的文件:
function download510(form) {
if (form.pass.value=="tokheim") {
location="../pdf/quantium-510.pdf"
} else {
alert("Invalid Password")
}
};
function download410(form) {
if (form.pass.value=="tokheim") {
location="../pdf/quantium-410.pdf"
} else {
alert("Invalid Password")
}
};
还有两个.php
文件:
1:
<form name="login">
<input name="pass" type="password">
<input type="button" value="Download" onClick="download510(this.form)">
</form>
2:
<form name="login">
<input name="pass" type="password">
<input type="button" value="Download" onClick="download410(this.form)">
</form>
只有第一个函数download510(form)
, 有效。任何想法将不胜感激。