Skip to content

Instantly share code, notes, and snippets.

View seven-lh's full-sized avatar
🎯
Focusing

Lance seven-lh

🎯
Focusing
View GitHub Profile
@seven-lh
seven-lh / object-to-form-data.js
Created October 15, 2018 06:41 — forked from ghinda/object-to-form-data.js
JavaScript Object to FormData, with support for nested objects, arrays and File objects. Includes Angular.js usage.
// takes a {} object and returns a FormData object
var objectToFormData = function(obj, form, namespace) {
var fd = form || new FormData();
var formKey;
for(var property in obj) {
if(obj.hasOwnProperty(property)) {
if(namespace) {
@seven-lh
seven-lh / index.html
Created August 7, 2018 11:21
快速排序 + 每秒输出一个数 // source http://jsbin.com/subirov
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>快速排序 + 每秒输出一个数</title>
</head>
<body>
<script id="jsbin-javascript">
@seven-lh
seven-lh / HTML-tags.md
Created September 25, 2017 11:26 — forked from yisibl/HTML-tags.md
常用的 HTML 头部标签

常用的 HTML 头部标签

详细介绍参见原文:yisibl/blog#1

<!DOCTYPE html> <!-- 使用 HTML5 doctype,不区分大小写 -->
<html lang="zh-cmn-Hans"> <!-- 更加标准的 lang 属性写法 http://zhi.hu/XyIa -->
<head>
    <meta charset='utf-8'> <!-- 声明文档使用的字符编码 -->
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <!-- 优先使用 IE 最新版本和 Chrome -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<div id="out">
<canvas id="canvas"></canvas>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
<title>JS Bin</title>
<style id="jsbin-css">
body {
width: 320px;
min-height: 568px;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<div id="content">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<div id="content">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<div id="testJsonp"></div>
<button onclick="getPrice()">reFresh Price</button>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<div id="content">