|
蓝森林 http://www.lslnet.com 2006年8月25日 8:28
!tmp是什么意思
<script language="javascript">
function chkinput(f){
var tmp = f.name.value;
if(!tmp) {
alert("请填写您要查询的内容!");
return false;}
var tmp2 = f.tiaojian.value;
if(!tmp2) {
alert("请选择您要查询的条件!");
return false;}
return true;}
function chkinput2(f){
var tmp = f.user.value;
if(!tmp) {
alert("帐号不能为空!");
return false;}
var tmp2 = f.pass.value;
if(!tmp2) {
alert("密码不能为空!");
return false;}
var tmp3 = f.site.value;
if(!tmp3) {
alert("您没有选择信箱!");
return false;}
return true;}
function MM_openBrWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}
</script> |
下面是我在http://www.hao123.com找的代码这句!tmp和function MM_openBrWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}
怎么理解啊
<script language="javascript">
function chkinput(f){
var tmp = f.name.value;
if(!tmp) {
alert("请填写您要查询的内容!");
return false;}
var tmp2 = f.tiaojian.value;
if(!tmp2) {
alert("请选择您要查询的条件!");
return false;}
else
return true;}
function chkinput2(f){
var tmp = f.user.value;
if(!tmp) {
alert("帐号不能为空!");
return false;}
var tmp2 = f.pass.value;
if(!tmp2) {
alert("密码不能为空!");
return false;}
var tmp3 = f.site.value;
if(!tmp3) {
alert("您没有选择信箱!");
return false;}
else
return true;}
function MM_openBrWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}
</script> |
! 逻辑反
if(!tmp) 解读为 如果tmp不为空的话
|
|