Prototype实战教程----1.$$

鲁花的顶头上司

鲁花的顶头上司

2016-02-19 16:37

下面,图老师小编带您去了解一下Prototype实战教程----1.$$,生活就是不断的发现新事物,get新技能~

htmlheadtitleTest $$/titlescript src="prototype.js"/scriptscriptfunction test$$(){  /**//*   in case CSS is not your forte, the expression below says   'find all the INPUT elements that are inside   elements with class=field that are inside a DIV   with id equal to loginForm.'  */  var f = $$('div#loginForm .field input');  var s = '';  for(var i=0; if.length; i++){    s += f[i].value + '/';  }  alert(s); // shows: "joedoe1/secret/"  //now passing more than one expression  f = $$('div#loginForm .field input', 'div#loginForm .fieldName');  s = '';  for(var i=0; if.length; i++){    s += ( f[i].value ? f[i].value : f[i].innerHTML ) + '/';  }  alert(s); //shows: "joedoe1/secret/User name:/Password:/"var  temp=$$('div#loginForm .field');  alert(temp.innerHTML);}function testtoColorPart(){var num=new Number(50);  alert(num.toColorPart());  }

(本文来源于图老师网站,更多请访问https://m.tulaoshi.com/webkaifa/)

  /script

div id='loginForm'  div class='field'    span class='fieldName'User name:/span    input type='text' id='txtName' value='joedoe1'/  /div  div class='field'    span class='fieldName'Password:/span    input type='password' id='txtPass' value='secret' /  /div  input type='submit' value='login' //divinput type=button value='test $$()' onclick='test$$();' /input type=button value='testtoColorPart' onclick='testtoColorPart();' //body/html

(本文来源于图老师网站,更多请访问https://m.tulaoshi.com/webkaifa/)
展开更多 50%)
分享

猜你喜欢

Prototype实战教程----1.$$

Web开发
Prototype实战教程----1.$$

Prototype实战教程----2.$A

Web开发
Prototype实战教程----2.$A

s8lol主宰符文怎么配

英雄联盟 网络游戏
s8lol主宰符文怎么配

Prototype实战教程----6.$

Web开发
Prototype实战教程----6.$

Prototype实战教程----3.$F

Web开发
Prototype实战教程----3.$F

lol偷钱流符文搭配推荐

英雄联盟 网络游戏
lol偷钱流符文搭配推荐

Prototype实战教程----11.Inserttion

Web开发
Prototype实战教程----11.Inserttion

Prototype实战教程----4.$H

Web开发
Prototype实战教程----4.$H

lolAD刺客新符文搭配推荐

英雄联盟
lolAD刺客新符文搭配推荐

MySQL数据库的临时文件究竟储存在哪里

MySQL数据库的临时文件究竟储存在哪里

实例分析:MySQL优化经验

实例分析:MySQL优化经验
下拉加载更多内容 ↓