日期:2014-05-16 浏览次数:20532 次
window.onload = function ()
{
var oinput = document.getElementById('oint');
var oput = document.getElementById('put');
var spacecheck = /\s/ig;
oput.onclick = function ()
{
var optm = prompt('请问是这样吗?');
if(optm!=null)
{
oint.value = optm;
}
else if(optm == null||optm =="")
{
alert("空值");
}
}
}
if(optm == null
------解决方案--------------------
optm =="")
{
alert("空值");
} else {
oint.value = optm;
}
}
if(optm!=null)
{oint.value = optm;}
else if(optm == null
------解决方案--------------------
optm =="")
{alert("空值");