2017.7.19

document.write(location.href);        返回当前网页的网址
document.write(location.pathname);    返回当前URL的路径名
location.assign("网址")            方法加载新的文档。
history.back()        history.forward()    转到上\下一页    button=“。。。。”
var r=confirm("Press a button!");    跳出来的提示框有选项        confirm("文本")
 var name=prompt("请输入您的名字",value="Bill Gates")    输入框        prompt("文本","默认值")
 var t=setTimeout("javascript语句",毫秒)
 setTimeout()
未来的某时执行代码
clearTimeout()
取消setTimeout() 
clearTimeout(t);  归零

function stopCount()
{
c=0;
setTimeout("document.getElementById('txt').value=0",0);
clearTimeout(t);
}
先归到0在停止


 function stopCount()        //  如果是上面的变量的话会停止,如果是t的话回归零
{
c=0;
setTimeout("document.getElementById('txt').value=0",0);
clearTimeout(t);
}

在本教程中,我们将了解到一些广受欢迎的 JavaScript 框架:
jQuery
Prototype
MooTools

引入jQuery   getElementById("1")   可以写成 $("#=2")前提是后面的id为<h id="2">
<script>
function myFunction()
{
$("#h01").attr("style","color:red").html("Hello jQuery")
}
$(document).ready(myFunction);
</script>

转载于:https://my.oschina.net/u/3610400/blog/1475586

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值