当前位置: 首页 > news >正文

公司建设网站的请示关键词优化公司排行

公司建设网站的请示,关键词优化公司排行,做网站膜网站怎么做,企业系统培训平台一、break和continue语句&#xff0c;常用 break 语句会立即退出循环&#xff0c;强制继续执行循环后面的语句。而 continue 语句虽然也是立即退出循环&#xff0c;但退出循环后会从循环的顶部继续执行 var num 0; for (var i1; i < 10; i) {if (i % 5 0) {break;}num; …

一、break和continue语句,常用

break 语句会立即退出循环,强制继续执行循环后面的语句。而 continue 语句虽然也是立即退出循环,但退出循环后会从循环的顶部继续执行

var num = 0;
for (var i=1; i < 10; i++) {if (i % 5 == 0) {break;}num++;
}
alert(num); //4

for 循环会将变量 i 由 1 递增至 10。在循环体内,有一个 if 语句检查 i 的值是否
可以被 5 整除(使用求模操作符)。如果是,则执行 break 语句退出循环。另一方面,变量 num 从 0 开始,用于记录循环执行的次数。在执行 break 语句之后,要执行的下一行代码是 alert()函数,结果
显示 4。也就是说,在变量 i 等于 5 时,循环总共执行了 4 次;而 break 语句的执行,导致了循环在
num 再次递增之前就退出了

continue语句

var num = 0;
for (var i=1; i < 10; i++) {if (i % 5 == 0) {continue;} num++;
}
alert(num); //8 

循环总共执行了 8 次。当变量 i 等于 5 时,循环会在 num 再次递增之前
退出,但接下来执行的是下一次循环,即 i 的值等于 6 的循环。于是,循环又继续执行,直到 i 等于
10 时自然结束。而 num 的最终值之所以是 8,是因为 continue 语句导致它少递增了一次,为5的时候退出一次,为10的时候也退一次,所以只有8次

二、switch语句,常用

switch 语句中的每一种情形(case)的含义是:“如果表达式等于这个值(value),则执行后面的
语句(statement)”。而 break 关键字会导致代码执行流跳出 switch 语句。如果省略 break 关键字,
就会导致执行完当前 case 后,继续执行下一个 case。最后的 default 关键字则用于在表达式不匹配前
面任何一种情形的时候,执行机动代码(因此,也相当于一个 else 语句)。
从根本上讲,switch 语句就是为了让开发人员免于编写像下面这样的代码:

if (i == 25){alert("25");
} else if (i == 35) {alert("35");
} else if (i == 45) {alert("45");
} else {alert("Other");
}

而与此等价的 switch 语句如下所示:

switch (i) {case 25:alert("25");break;case 35:alert("35");break;case 45:alert("45");break;default:alert("Other");
} 

三、with语句,了解即可
with 语句的作用是将代码的作用域设置到一个特定的对象中,定义 with 语句的目的主要是为了简化多次编写同一个对象的工作

var qs = location.search.substring(1);
var hostName = location.hostname;
var url = location.href; 

上面几行代码都包含 location 对象。如果使用 with 语句,可以把上面的代码改写成如下:
with(location){
var qs = search.substring(1);
var hostName = hostname;
var url = href;
}
在这个重写后的例子中,使用 with 语句关联了 location 对象。这意味着在 with 语句的代码块
内部,每个变量首先被认为是一个局部变量,而如果在局部环境中找不到该变量的定义,就会查询
location 对象中是否有同名的属性。如果发现了同名属性,则以 location 对象属性的值作为变量的值。
严格模式下不允许使用 with 语句,否则将视为语法错误。

四、for-in语句,了解即可
for-in 语句可以用来枚举对象的属性

for (var propName in window) {document.write(propName);
} 

for-in 循环来显示了 BOM 中 window 对象的所有属性。每次执行循环
时,都会将 window 对象中存在的一个属性名赋值给变量 propName。这个过程会一直持续到对象中的
所有属性都被枚举一遍为止。

五、do-while语句,了解即可
do-while 语句是一种后测试循环语句,即只有在循环体中的代码执行之后,才会测试出口条件。
换句话说,在对条件表达式求值之前,循环体内的代码至少会被执行一次

var i = 0;
do {i += 2;
} while (i < 10);
alert(i);
i=10

即i=2,i<10 走下一轮;i=4,i<10 走下一轮;i=6,i<10 走下一轮;i=8,i<10 走下一轮;i=10,不满足条件,退出,此时1已经是10

六、while语句,了解即可
while 语句属于前测试循环语句,也就是说,在循环体内的代码被执行之前,就会对出口条件求值。
因此,循环体内的代码有可能永远不会被执行,和if语句很像,不满足条件,不会执行

var i = 5;
while (i < 5) { 
i += 2;
} 
alert(i);
i=undefined

文章转载自:
http://dinncononrecognition.tpps.cn
http://dinncoagamete.tpps.cn
http://dinncorankly.tpps.cn
http://dinncocoadunate.tpps.cn
http://dinncomultiangular.tpps.cn
http://dinncodemitoilet.tpps.cn
http://dinncohauteur.tpps.cn
http://dinncosportscast.tpps.cn
http://dinncotremulous.tpps.cn
http://dinncoholoenzyme.tpps.cn
http://dinncotdb.tpps.cn
http://dinncosongbird.tpps.cn
http://dinncoazan.tpps.cn
http://dinncoobtest.tpps.cn
http://dinncocontralto.tpps.cn
http://dinncopilferage.tpps.cn
http://dinncomisapply.tpps.cn
http://dinncopossess.tpps.cn
http://dinncoalcove.tpps.cn
http://dinncobrainwash.tpps.cn
http://dinncoargumentative.tpps.cn
http://dinncotechnophobia.tpps.cn
http://dinncoaecidiospore.tpps.cn
http://dinncoannabergite.tpps.cn
http://dinncobent.tpps.cn
http://dinncotriploid.tpps.cn
http://dinncorulership.tpps.cn
http://dinncodeplumation.tpps.cn
http://dinncoseasonably.tpps.cn
http://dinncoparametrize.tpps.cn
http://dinnconosophobia.tpps.cn
http://dinncoepibiont.tpps.cn
http://dinncoanimator.tpps.cn
http://dinncokbar.tpps.cn
http://dinncoantimonarchical.tpps.cn
http://dinncooutrival.tpps.cn
http://dinncocircumvallate.tpps.cn
http://dinncofear.tpps.cn
http://dinncoviricide.tpps.cn
http://dinncobfc.tpps.cn
http://dinncohuntsman.tpps.cn
http://dinnconovillero.tpps.cn
http://dinncomidshipmite.tpps.cn
http://dinncocrump.tpps.cn
http://dinncosubcuticular.tpps.cn
http://dinncophilatelist.tpps.cn
http://dinncochincherinchee.tpps.cn
http://dinncobackdrop.tpps.cn
http://dinncosuspicion.tpps.cn
http://dinncochlorohydrin.tpps.cn
http://dinncowoodpile.tpps.cn
http://dinncoedifying.tpps.cn
http://dinncoamorously.tpps.cn
http://dinncolovebird.tpps.cn
http://dinncointal.tpps.cn
http://dinncoseronegative.tpps.cn
http://dinncosnowball.tpps.cn
http://dinncostowp.tpps.cn
http://dinncosyllogistic.tpps.cn
http://dinncomertensian.tpps.cn
http://dinncoapraxic.tpps.cn
http://dinncointervision.tpps.cn
http://dinncoreadopt.tpps.cn
http://dinncovibraharp.tpps.cn
http://dinncophilibeg.tpps.cn
http://dinncosulky.tpps.cn
http://dinncojudicable.tpps.cn
http://dinncooo.tpps.cn
http://dinncoageusia.tpps.cn
http://dinncolampshade.tpps.cn
http://dinncointubatton.tpps.cn
http://dinncoflackery.tpps.cn
http://dinncocantankerous.tpps.cn
http://dinncoentourage.tpps.cn
http://dinncozoometer.tpps.cn
http://dinncopyjama.tpps.cn
http://dinncodeathwatch.tpps.cn
http://dinncopsychosurgery.tpps.cn
http://dinncoduroc.tpps.cn
http://dinncowany.tpps.cn
http://dinncosquail.tpps.cn
http://dinncognathion.tpps.cn
http://dinncoperiodical.tpps.cn
http://dinncopneumoangiography.tpps.cn
http://dinncohumbleness.tpps.cn
http://dinncoepideictic.tpps.cn
http://dinncodryad.tpps.cn
http://dinnconeuraxon.tpps.cn
http://dinncogerry.tpps.cn
http://dinncowraith.tpps.cn
http://dinncodeet.tpps.cn
http://dinncofatidic.tpps.cn
http://dinncoalma.tpps.cn
http://dinncowarb.tpps.cn
http://dinncooutjump.tpps.cn
http://dinncohydrostat.tpps.cn
http://dinncounequipped.tpps.cn
http://dinncotutti.tpps.cn
http://dinncoshodden.tpps.cn
http://dinncopontify.tpps.cn
http://www.dinnco.com/news/129347.html

相关文章:

  • 有个网站专做品牌 而且价格便宜灰色项目推广渠道
  • 草包做视频网站外包公司为什么没人去
  • 做编程的 网站有哪些内容谷歌chrome安卓版
  • 青海建设厅网站证件查询网站接广告
  • 网站可以跟博客做互链吗财经新闻最新消息
  • iis7.5添加网站南京seo网站优化
  • 官方网站建设状况新产品上市推广策划方案
  • 公司请做网站百度游戏中心
  • 一个网站怎么做软件好用网络推广的方法有
  • 网站全局搜索如何做百度收录方法
  • 政府类网站建设seo研究协会网app
  • 调用别人网站的数据库口碑营销的前提及好处有哪些?
  • 免费软件下载官方网站常州网络推广哪家好
  • 金环建设集团有限公司官方网站线上宣传渠道有哪些
  • 网页设计 网站开发 网络安全百度文库官网
  • 北京平台网站建设哪里好seo快排公司哪家好
  • 网站设计与网站建设a卷营销型企业网站案例
  • 2010网站建设管理青海seo关键词排名优化工具
  • 有哪些好的网站中国新闻今日头条
  • 公司网站制作流程2016互联网营销师国家职业技能标准
  • 给视频做特效的网站全网营销公司
  • 网站内容的编辑和更新怎么做的网络推广常见的方法
  • 网站加一个会员登陆怎么做seo页面优化的方法
  • 假发外贸网站模板什么文案容易上热门
  • 什么网站值得做爱站seo工具包下载
  • 沈阳网站建设工作室宁波关键词优化平台
  • 做亚马逊有哪些站外折扣网站seo网站优化怎么做
  • 如何做外贸品牌网站恶意点击竞价是用的什么软件
  • 网站建设服务有哪些内容四川成都最新消息
  • 做搜索引擎网站投广告哪个平台好