- Sep 05 Tue 2023 16:39
-
windows apache 安裝中華電信ssl
- Dec 05 Thu 2019 09:31
-
html line分享,fb分享
http://www.facebook.com/share.php?u=分享網址
http://twitter.com/home/?status=網址標題 分享網址
<a href="http://line.naver.jp/R/msg/text/?大家跟我一起用Line分享吧!%0D%0Ahttp://blog.ja-anything.com/
http://twitter.com/home/?status=網址標題 分享網址
<a href="http://line.naver.jp/R/msg/text/?大家跟我一起用Line分享吧!%0D%0Ahttp://blog.ja-anything.com/
- Dec 05 Thu 2019 09:28
-
html 安裝 fb message 插件
<div id="fb-root"></div>
<script>
window.fbAsyncInit = function() {
FB.init({
xfbml : true,
version : 'v5.0',
});
};
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = 'https://connect.facebook.net/zh_TW/sdk/xfbml.customerchat.js';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<script>
window.fbAsyncInit = function() {
FB.init({
xfbml : true,
version : 'v5.0',
});
};
(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = 'https://connect.facebook.net/zh_TW/sdk/xfbml.customerchat.js';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
- Aug 02 Tue 2016 10:49
-
swift2 實作uitoolbar
toolBar = UIToolbar(frame: CGRectMake(0, self.view.frame.size.height - 46, self.view.frame.size.width, 46))
- Feb 25 Thu 2016 13:55
-
ios apns 推播設定 及程式寫法 Apple Push Nofification service SSL Certificates (紀錄
- May 11 Mon 2015 17:25
-
phpmailer 至少指定一個寄件者錯誤 Mailer Error: You must provide at least one recipient email address.
737 行
修改
public static function ValidateAddress($address) {
/*return preg_match('/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)((?>(?>(?>((?>(?>(?>
)?[ ])+|(?>[ ]*
)?[ ]+)?)(\((?>(?2)(?>[--\'*-\[\]-]|\\\[ -]|(?3)))*(?2)\)))+(?2))|(?2))?)([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[--!#-\[\]-]|\\\[ -]))*(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}|(?!(?:.*[a-f0-9][:\]]){7,})((?6)(?>:(?6)){0,5})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:|(?!(?:.*[a-f0-9]:){5,})(?8)?::(?>((?6)(?>:(?6)){0,3}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD', $address);
*/
return true;
}
修改
public static function ValidateAddress($address) {
/*return preg_match('/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)((?>(?>(?>((?>(?>(?>
)?[ ])+|(?>[ ]*
)?[ ]+)?)(\((?>(?2)(?>[--\'*-\[\]-]|\\\[ -]|(?3)))*(?2)\)))+(?2))|(?2))?)([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[--!#-\[\]-]|\\\[ -]))*(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}|(?!(?:.*[a-f0-9][:\]]){7,})((?6)(?>:(?6)){0,5})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:|(?!(?:.*[a-f0-9]:){5,})(?8)?::(?>((?6)(?>:(?6)){0,3}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD', $address);
*/
return true;
}
- Jan 26 Mon 2015 17:42
-
JS用RE(正規化表示法)做資料驗證
/ 身份證字號
function checkID(string) {
re = /^[A-Z]\d{9}$/;
if (re.test(string))
return true;
}
// 信用卡號
function checkCreditCard(string) {
re = /^\d{4}-\d{4}-\d{4}-\d{4}$/;
// re = /^(\d{4}-){3}\d{4}$/;
if (re.test(string))
return true;
}
// 英文名稱
function checkEnglishName(string) {
re1 = /^[A-Za-z\-]+\s+[A-Za-z\-]+$/;
re2 = /^[A-Za-z\-]+\s+[A-Za-z\-]+\s+[A-Za-z\-]+$/;
if (re1.test(string) || re2.test(string))
return true;
}
// Email
function checkEmail(string) {
re = /^.+@.+\..{2,3}$/;
if (re.test(string))
return true;
}
// 數字
function checkNumber(string) {
re = /^\d+$/;
if (re.test(string))
return true;
}
// TextBox
function checkValue(aTextID)
{
re = /\S/;
var oText = document.all[aTextID];
var sVal = Trim(oText.value);
if(!re.test(sVal)){
try{
alert("[" + oText.title + "]" + " 必需填寫!")
event.returnValue = false;
oText.focus();
return false;
}
catch (e){
//alert(e.description);
}
}
return true;
}
function checkID(string) {
re = /^[A-Z]\d{9}$/;
if (re.test(string))
return true;
}
// 信用卡號
function checkCreditCard(string) {
re = /^\d{4}-\d{4}-\d{4}-\d{4}$/;
// re = /^(\d{4}-){3}\d{4}$/;
if (re.test(string))
return true;
}
// 英文名稱
function checkEnglishName(string) {
re1 = /^[A-Za-z\-]+\s+[A-Za-z\-]+$/;
re2 = /^[A-Za-z\-]+\s+[A-Za-z\-]+\s+[A-Za-z\-]+$/;
if (re1.test(string) || re2.test(string))
return true;
}
function checkEmail(string) {
re = /^.+@.+\..{2,3}$/;
if (re.test(string))
return true;
}
// 數字
function checkNumber(string) {
re = /^\d+$/;
if (re.test(string))
return true;
}
// TextBox
function checkValue(aTextID)
{
re = /\S/;
var oText = document.all[aTextID];
var sVal = Trim(oText.value);
if(!re.test(sVal)){
try{
alert("[" + oText.title + "]" + " 必需填寫!")
event.returnValue = false;
oText.focus();
return false;
}
catch (e){
//alert(e.description);
}
}
return true;
}
- Dec 29 Mon 2014 15:31
-
js input 只能輸入數字的方法
$('#tab_edit_bor input[type="text"]').keypress(function(e){
if((e.shiftKey && e.keyCode == 45) || e.which!=8 &&
e.which!=0 &&(e.which<48 || e.which>57))return false
});
if((e.shiftKey && e.keyCode == 45) || e.which!=8 &&
e.which!=0 &&(e.which<48 || e.which>57))return false
});
- Nov 23 Sun 2014 00:30
-
jquery css 觸發 dialog
$('#myModal').modal('show');
- Nov 18 Tue 2014 18:01
-
jquery hide() 或 show 無效時的另類寫法
$("#xxx").hide("slow",function(){$(this).css("display","none")});
$("#xxx").show("slow",function(){$(this).css("display","block")});
$("#xxx").show("slow",function(){$(this).css("display","block")});
- Nov 04 Tue 2014 14:42
-
checkbox 複選 賦值
$("input:checkbox[name='ip_sel[]'][value='"+IP[i].ip+"']").prop("checked",true);
- Nov 03 Mon 2014 15:39
-
checkbox 複選取值法
$('input:checkbox:checked[name="ip_sel[]"]').map(function() { return $(this).val(); }).get();

