這篇文章受密碼保護,請輸入密碼後查看內容。
- Dec 17 Thu 2015 18:31
-
TEST
- Jun 01 Wed 2016 12:12
-
上傳前預覽
<html>
<head>
<style type="text/css">.thumb-image{float:left;width:100px;position:relative;padding:5px;}</style>
</head>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<div id="wrapper" style="margin-top: 20px;"><input id="fileUpload" multiple="multiple" type="file"/>
<div id="image-holder"></div>
</div>
<head>
<style type="text/css">.thumb-image{float:left;width:100px;position:relative;padding:5px;}</style>
</head>
<body>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<div id="wrapper" style="margin-top: 20px;"><input id="fileUpload" multiple="multiple" type="file"/>
<div id="image-holder"></div>
</div>
- May 12 Thu 2016 11:46
-
SQL 排序置換
If 'Peter' and 'Steve' are unique in your table, this will do:
- May 06 Fri 2016 11:54
-
C# 載入資料夾內所有圖片
string bookNo = "01";
bookNo = Request.Params["no"] == null ? "01" : Request.Params["no"];
DirectoryInfo dir = new DirectoryInfo(Server.MapPath("~/_img/bookImg/" + bookNo));
if(!dir.Exists){
dir = new DirectoryInfo(Server.MapPath("~/_img/bookImg/01"));
bookNo = "01";
}
FileInfo[] files = dir.GetFiles();
StringBuilder sb = new StringBuilder();
foreach (FileInfo file in files)
{
sb.Append("<img src='' data-original='_img/bookImg/" + bookNo + "/" + file.Name + "' style='width:100%;' />");
}
bookImg.InnerHtml = sb.ToString();
bookNo = Request.Params["no"] == null ? "01" : Request.Params["no"];
DirectoryInfo dir = new DirectoryInfo(Server.MapPath("~/_img/bookImg/" + bookNo));
if(!dir.Exists){
dir = new DirectoryInfo(Server.MapPath("~/_img/bookImg/01"));
bookNo = "01";
}
FileInfo[] files = dir.GetFiles();
StringBuilder sb = new StringBuilder();
foreach (FileInfo file in files)
{
sb.Append("<img src='' data-original='_img/bookImg/" + bookNo + "/" + file.Name + "' style='width:100%;' />");
}
bookImg.InnerHtml = sb.ToString();
- May 06 Fri 2016 11:54
-
判別行動裝置
var uA = navigator.userAgent;
if (uA.match(/iPod/) || uA.match(/iPad/) || uA.match(/iPhone/) || uA.match(/Android/) || uA.match(/Windows Phone/)) {
location.href = "xxx.aspx?no=" + no;
} else {
$(".pobBox").load("xxx.aspx?no=" + no);
$(".popDiv").show(); $(".popDivBg").show();
}
if (uA.match(/iPod/) || uA.match(/iPad/) || uA.match(/iPhone/) || uA.match(/Android/) || uA.match(/Windows Phone/)) {
location.href = "xxx.aspx?no=" + no;
} else {
$(".pobBox").load("xxx.aspx?no=" + no);
$(".popDiv").show(); $(".popDivBg").show();
}
- May 06 Fri 2016 11:47
-
使用a 呼叫js 埋ga
<a class="viewBtn" href="javascript:showView('01')" onclick="ga('send', 'event', 'xxx', 'xxx', '1')"></a>
- May 06 Fri 2016 11:45
-
C# 直接下載檔案
protected void LinkButton5_Click(object sender, EventArgs e)
{
string filename = "xxx.pdf";
//從Server端取得檔案
Stream FileStream;
FileStream = File.OpenRead(Server.MapPath("~/xxx/xxx.pdf"));
downloadBook(filename, FileStream);
}
protected void downloadBook(string filename, Stream FileStream)
{
Byte[] Buf = new byte[FileStream.Length];
FileStream.Read(Buf, 0, int.Parse(FileStream.Length.ToString()));
FileStream.Close();
{
string filename = "xxx.pdf";
//從Server端取得檔案
Stream FileStream;
FileStream = File.OpenRead(Server.MapPath("~/xxx/xxx.pdf"));
downloadBook(filename, FileStream);
}
protected void downloadBook(string filename, Stream FileStream)
{
Byte[] Buf = new byte[FileStream.Length];
FileStream.Read(Buf, 0, int.Parse(FileStream.Length.ToString()));
FileStream.Close();
- Apr 13 Wed 2016 17:25
-
圖片按鈕 input file
way3
<div class="col-3 frmCaption">Attachments:</div>
<div class="col-9">
<label class="customUpload btnUpload btnM"> <span>Upload files</span>
<div class="col-3 frmCaption">Attachments:</div>
<div class="col-9">
<label class="customUpload btnUpload btnM"> <span>Upload files</span>
- Mar 30 Wed 2016 10:41
-
[轉貼]上傳檔案前,JavaScript檢查檔案格式、大小
- Mar 04 Fri 2016 17:00
-
css goTop
#goTop {
position: fixed;
bottom: 5px; /* 與下方的距離, 也可改為百分比, 即為距離螢幕下方的百分比 */
right: 5px; /* 與右方的距離 */
width: 40px; /* 按鈕原始寬度 */
height: 40px; /* 按鈕原始高度 */
opacity: 0.4; /* 按鈕原始透明度 */
z-index: 10;
cursor: pointer;
transition: all .5s; /* 動畫效果 持續期間 */
-webkit-transition: all .5s;
-moz-transition: all .5s;
}
#goTop:hover { /* 滑鼠經過按鈕時 */
opacity: 1; /* 透明度 */
width: 80px; /* 按鈕寬度 */
height: 80px; /* 按鈕高度 */
}
</style>
position: fixed;
bottom: 5px; /* 與下方的距離, 也可改為百分比, 即為距離螢幕下方的百分比 */
right: 5px; /* 與右方的距離 */
width: 40px; /* 按鈕原始寬度 */
height: 40px; /* 按鈕原始高度 */
opacity: 0.4; /* 按鈕原始透明度 */
z-index: 10;
cursor: pointer;
transition: all .5s; /* 動畫效果 持續期間 */
-webkit-transition: all .5s;
-moz-transition: all .5s;
}
#goTop:hover { /* 滑鼠經過按鈕時 */
opacity: 1; /* 透明度 */
width: 80px; /* 按鈕寬度 */
height: 80px; /* 按鈕高度 */
}
</style>
- Mar 04 Fri 2016 15:12
-
CSS animation