前端工程师面试题总结 - Coding(1)
来源:互联网 发布:h网络是什么意思 编辑:程序博客网 时间:2024/05/19 07:07
Question: Create a simple "Address Book" which allows the user to record the "first name" and "last name" with an "Add" button. For each record, provide a "Delete" button that allows the user to remove this record.
<html>
<head>
<title> Address Book </title>
<Script src="jquery-1.9.1.min.js"></script>
</head>
<body>
<input type="text" placeholder="Person's First Name" id="first_name"/>
<input type="text" placeholder="Person's Last Name" id="last_name"/>
<input type="button" value="Add" id="addBtn"/>
<table id="addressBook">
</table>
</body>
</html>
<script type="text/javascript">
$(document).ready(function(){
$("#addBtn").bind('click',function(){
var first_name = $("#first_name").val();
var last_name = $("#last_name").val();
$("#addressBook").append("<tr><td>" + first_name + "</td><td>" + last_name + "</td><td><input type='button' value='Delete' class='deleteBtn' /></td></tr>");
$(".deleteBtn").bind('click',function(){
$(this).parent().closest("tr").remove();
});
});
})
</script>
- 前端工程师面试题总结 - Coding(1)
- 前端工程师面试题总结 - HTML(1)
- 前端工程师面试题总结 - CSS(1)
- 前端工程师面试题总结 - JavaScript(1)
- 前端工程师面试题
- 前端工程师面试题
- 前端工程师面试题(一)
- 初级前端工程师面试题(网上收集的总结)
- 前端开发工程师面试题
- web前端工程师面试题
- 前端初级工程师面试题
- 前端初级工程师面试题
- 前端工程师面试题汇总
- 前端工程师面试题汇总
- 前端工程师面试题汇总
- 前端工程师面试题汇总
- 前端工程师面试题汇总
- 前端工程师面试题汇总
- Autodesk Vault 二次开发介绍之Web Service开发
- UML
- 辛星漫谈软件思想
- 前端工程师面试题总结 - JavaScript(1)
- 云编程那些事2 - Java之父的啤酒密谋
- 前端工程师面试题总结 - Coding(1)
- 展示glfw回调函数,鼠标 键盘 窗口等等,输入输出都齐了
- how to convert a object to json file immediately during debug?
- 最小正子串问题
- 最长回文子串
- C++11 Async cURL
- 辛星浅谈大型网站构架优化思路之一简化
- Leetcode: Same Tree
- python 笔记