forked from argomaintainer/jsbbs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
share.html
35 lines (35 loc) · 1.31 KB
/
share.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<html lang="zh-CN">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<title>分享到逸仙时空 Yat-sen Channel</title>
<link href="css/bootstrap.css" rel="stylesheet">
<script src="js/lib/jquery.js"></script>
</head>
<body>
<form onsubmit="return false;" id="form">
<label>分享到的看版</label>
<input type="text" id="inputer-boardname"/>
<label>标题</label>
<input type="text" id="inputer-title"/>
<label>正文</label>
<textarea id="inputer-text"></textarea>
<button type="submit" class="btn">提交</button>
</form>
<script>
(function(){
var para = location.search.substring(1).split('&&');
para.length = 3;
if(para[0]) $('#inputer-boardname').val(decodeURIComponent(para[0]));
if(para[1]) $('#inputer-title').val(decodeURIComponent(para[1]));
if(para[2]) $('#inputer-text').val(decodeURIComponent(para[2]));
})();
$('#form').submit(function(){
var boardname = $('#inputer-boardname').val()
, title = $('#inputer-title').val()
, text = $('#inputer-text').val();
console.log([boardname, title, text]);
});
</script>
</body>
</html>