我真的不知道为什么这两个函数 - leave()& do() - 不要运行!为什么这两个功能不想运行?
function leave()
{
var x = document.getElementById("x");
if(x.value == "")
{
alert("please enter your name");
x.focus();
}
}
function do()
{
var y = document.getElementById("y");
if (y.value = "enter your name here")
{
alert("enter your last name");
y.focus();
y.select();
}
}
这里是我的代码:http://jsfiddle.net/BsHa2
在此先感谢
邮政编码**在问题本身**,不要只是链接。这是**为什么**系统阻止您发布jsfiddle链接,直到您将其标记为代码。当然,围绕这样的系统工作并不是你最好的选择? –
[jsFiddle:html和js之间没有连接?无法从按钮调用简单的函数?](http://stackoverflow.com/questions/14499783/jsfiddle-no-connection-between-html-and-js-cant-call-simple-function-from-but) – Sirko
TJ Crowder,对不起,我不知道! 但我不能再问任何问题吗? –