今天的进度

蛋疼。。。刚刚写完一大堆,没有保存。。。然后关了网页,又写了一次。。。刷新了。。。蛋疼
----------------------------------------------------------------------------------------

今天的进度是这本书:《ajax,javascript,php 编程导学》读完第六章

相关知识点:

html基础知识
拉取图像
使用CSS和JS
使用连接
得到时间
表格添加    

网页消息提示:
连接或button的属性:onClick="alert('aha,nihao');"
点击后先弹出窗口,再跳转页面
字串操作
数组操作
数组排序
=================================================================================================
=================================================================================================
html文件
==========


<html>
<!-- -->

<head>
<title>偶的测试01</title>



<script language="javascript" type="text/javascript" src="./sort.js">
</script>
<!--脚本位置-->

<link rel="stylesheet" href="style01.css" type="text/css">
</link>
<!--CSS格式位置-->
</head>

<!-- --------------------------------- -->

<body bgcolor="#aaaaaa">

<input type="button" οnclick="history.back();" value="前一个页面">
<input type="button" οnclick="history.forward();" value="后一个页面">
<input type="button" οnclick="location.reload();" value="刷新">
<input type="button" οnclick="location.replace();" value="百度">
<a href="http://www.baidu.com" onClick="alert('aha,nihao');"><h1>
This is a test !点这里进百度</h1> </a>

<script language="javascript" type="text/javascript">
now = new Date();
// while(1)
// {
localtime = now.toString();
utctime = now.toGMTString();
document.write(localtime + "<br>" + "<hr>");
document.write(utctime + "<br>");
// }
</script>


<table width="10%" rules=cols style="background: aqua" border="2">
<tr>
<th bgcolor=yellow>名字</th>
<th bgcolor=yellow>性别</th>
</tr>
<tr>
<td>小明</td>
<td>男</td>
</tr>
<tr>
<td>小丽</td>
<td>女</td>
</tr>
</table>

<img src="aaa.bmp" border="2" alt="cathedral" width="500" height="150" />


<p>
<!-- 段落 -->

</p>

<form name="myform">

name: <input type="text" name="newname" size="20"> <input
type="button" name="add" value="添加并排序" οnclick="sortnames();">
<br>
<h2>显示排序</h2>

<textarea cols="60" rows="10" name="sorted">在这里显示排序</textarea>

</form>

</body>

</html>

=================================================================================================
=================================================================================================
js文件
==========
var numnames =0;
var names = new Array();

function sortnames()
{
thename=document.myform.newname.value;
names[numnames]=thename; //名字数组
numnames++;
names.sort();//排序
document.myform.sorted.value=names.join("\n"); //以换行符做分隔符 将字符串赋值给显示
}


=================================================================================================
=================================================================================================
css文件
-======
table.nav{background:aqua}

table.rest{
background:yellow;
text-align:center;
color:black
}


a:link{
color:red;
text-decoration:none
}

今天的进度

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值