简单的todoList源码


在这里插入图片描述

建立自适应的HTML页面

// An highlighted block
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> 
		<title>ToDoList—最简单的待办事项列表</title>
		<meta name="description" content="ToDoList无须注册即可使用,数据存储在用户浏览器的html5本地数据库里,是最简单最安全的待办事项列表应用!" />
		<link rel="stylesheet" href="index.css">
	</head>
	<body>
		<header>
			<section>
				<form action="javascript:postaction()" id="form">
					<label for="title">ToDoList</label>
					<input type="text" id="title" name="title" placeholder="添加ToDo" required="required" autocomplete="off" />
				</form>
			</section>
		</header>
		<section>
			<h2 onclick="save()">正在进行 <span id="todocount"></span></h2>
			<ol id="todolist" class="demo-box">
			</ol>
			<h2>已经完成 <span id="donecount"></span></h2>
			<ul id="donelist">
			</ul>
		</section>
		<footer>
			<a href="javascript:clear();">clear</a>
		</footer>
		<script type="text/javascript" src="index.js"></script>
	</body>
</html>

引入css样式

// An highlighted block
body {
   margin:0;padding:0;font-size:16px;background: #CDCDCD;}
header {
   height:50px;background:#333;background:rgba(47,47,47,0.98);}
section{
   margin:0 auto;}
label{
   float:left;width:100px;line-height:50px;color:#DDD;font-size:24px;cursor:pointer;font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;}
header input{
   float:right;width:60%;height:24px;margin-top:12px;text-indent:10px;border-radius:5px;box-shadow
  • 3
    点赞
  • 19
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值