蓝森林首页 | 返回主页 | 本站地图 | 站内搜索 | 联系信箱 |
 您目前的位置:首页 > 自由软件 > 技术交流 > 应用编程


    

蓝森林 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不为空的话




Copyright © 1999-2000 LSLNET.COM. All rights reserved. 蓝森林网站 版权所有。 E-mail : webmaster@lslnet.com