javascript大牛的简单介绍
如何成为一个JavaScript 大牛
冒昧地提供一些建议,基本是翻译过来的:
创新互联公司成立与2013年,先为乌恰等服务建站,乌恰等地企业,进行企业商务咨询服务。为乌恰企业网站制作PC+手机+微官网三网同步一站式服务解决您的所有建站问题。
1 忽视那些否定者2 从[x]amp上手3 学习基础4 在code academy 、lynda之类的教程网上学习
5 阅读一些书:php cookbook, php for absolute begginers, etc.
6 写点简单的代码:留言板、论坛、博客 etc.
7 写点复杂的东西:ORM、实现某个特定需求的类库 etc.
8 接触一个轻量级框架:CI、kohana etc.
9 学习一个完整级框架:ZF、symfony etc.
10 做一些牛x的应用
11 善用工作流:git etc.
12 保持不断的学习
13 Be open mind,学习ruby等的优点
我觉得这样还算不了大牛,因为PHP跟前端(javascript)、跟服务器(linux)都息息相关,还有C扩展的知识,要补充web的知识,还要学习和对比其他语言的优点(python、ruby、go etc.),还有网络(http、tcp/ip etc)
这样够了吗? 也许吧。
跪求javascript大牛解决个问题,我现在想实现的点击按钮创建一个红色div,红色div里面有按钮。
script
var down='';
var cx='';
var cy='';
var div=null;
function dianji(){
if(div!=null){
return;
}
div=document.createElement('div');
div.className='demo';
// div.innerHTML='input type="button" value="关闭" onclick=""/';
div.style.top=60;
div.style.left=60;
document.body.appendChild(div);
var dell=document.createElement('input');
dell.type='button';
dell.value='关闭';
div.appendChild(dell);
div.onmousedown=function(e){
var ev=e||event;
cy=ev.clientY-parseInt(div.style.top);
cx=ev.clientX-parseInt(div.style.left);
//cx=(ev.clientY-parseInt(img.style.top));
//cy=(ev.clientX-parseInt(img.style.left));
if(!down){
down=true;
}
}
div.onmouseup=function(){
if(down){
down=false;
}
}
dell.onclick=function(){
alert('1111');
//pobj.removeChild(pobj.lastChild);
document.body.removeChild(div);
}
}
document.body.onmousemove=function(e){
var ev=e||event;
if(down){
div.style.top=(ev.clientY-cy);
div.style.left=(ev.clientX-cx);
}
}
/script
试试吧,看是不是你要的效果
求助javascript大牛,网页倒计时如何实习那
html
head
titletest/title
meta http-equiv="Content-Type" content="text/html; charset=gb2312"
/head
body
div id="shows"/div
script type="text/javascript"
var Time = {};
Time.time = 0;
Time.init = function(time)
{
this.time = time;
this.countdown(time);
}
Time.countdown = function(time)
{
var nowTime = Math.round(new Date().getTime()/1000);
var time = time-nowTime;
var showDiv= document.getElementById('shows');
var that = this;
if(time0 time3600){
var minute = Math.round(time/60);
var seconds = Math.round(time%60)
if(minute10) minute = '0' + minute;
if(seconds10) seconds = '0'+seconds;
showDiv.innerHTML = "离"+this.getMyDate()+"还有"+this.sfm(time);
setTimeout(function(){that.countdown(that.time);},1000);
}else if(time=0){
showDiv.innerHTML = "已经到"+this.getMyDate()+"了!";
}else{
var day = 0;
var hours = Math.floor(time/3600);
var mytime = '';
if(hours24){
day = Math.floor(hours/24);
hours = (hours-day*24)%60;
}
mytime += day + '日'+hours+'小时';
showDiv.innerHTML = "离"+this.getMyDate()+"还有"+mytime;
setTimeout(function(){that.countdown(that.time);},1000);
}
}
//获取年月日时分秒
Time.getMyDate = function(){
var time = new Date(this.time*1000);
var date = time.getFullYear()+"-"+(time.getMonth()+1==12?1:time.getMonth()+1)+"-"+time.getDate()+" "+time.toLocaleTimeString();
return date;
}
//获取时分秒
Time.sfm = function(time)
{
var minute = Math.round(time/60);
var seconds = Math.round(time%60)
if(minute10) minute = '0' + minute;
if(seconds10) seconds = '0'+seconds;
return "00:"+minute+":"+seconds;
}
Time.init(1309897699);
/script
/body
/html
看看这个怎么样
有javascript的大牛吗?我做了一个四则运算的函数,可是运行就不对,不知道错在哪儿
!DOCTYPE html
html
head
meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
titleRunJS 演示代码/title
script
function jia(x,y){return x+y;}
function jian(x,y){return x-y;}
function cheng(x,y){return x*y;}
function chu(x,y){return x/y;}
function dy(op,x,y){
document.write( eval(["jia","jian","cheng","chu"]["加减乘除".indexOf(op)]+"("+x+","+y+")"));
}
var op=prompt("输入op","");
var x = prompt("输入x","");
var y=prompt("输入y","");
document.write("div id='show'scriptdy('"+op+"','"+x+"','"+y+"')/scr"+"ipt/div");
/script
/head
body
/body
/html
当前名称:javascript大牛的简单介绍
URL分享:http://azwzsj.com/article/dsgjcco.html