Hiển thị các bài đăng có nhãn modul javascript - jquery. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn modul javascript - jquery. Hiển thị tất cả bài đăng

Thứ Hai, 17 tháng 10, 2016

làm thế nào để tạo messenger facebook button

Then use the post body as the schema.org description, for good G+/FB snippeting. -->
Tạo nút thông báo tin nhắn mặc định của facebook, tạo ra bởi javascript.
Không giống như các tùy chọn trước đó cho phép gửi hồ sơ cá nhân, nút này có sẵn trên trang chủ của facebook cho người dùng facebook.
Để bắt đầu tạo messenger facebook button, bạn sao chép đoạn code sau và dán vào trong blog phần bạn muốn nó xuất hiện.

<script>
window.fbAsyncInit = function() {
FB.init({
appId : '95100348886',
xfbml : true,
version : 'v2.6'
});
};
 
(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 = "//connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div class="fb-messengermessageus"
messenger_app_id="95100348886"
page_id="XYZ"
color="blue"
size="large">
</div>


==> Nhưng bạn phải nhớ rằng thay "XYZ" với id trang facebook của bạn.
chú ý:
- App Id ở đây là app của chúng tôi đã tạo trên app của facebook, bạn cũng có thể tạo ra 1 app riêng của mình bằng cách nhấp vào link sau: tạo app facebook.
Chi tiết tạo app bạn tham khảo bài hướng dẫn tạo app id facebook của trang thachpham.com
- How to Facebook Message Buttons tham khảo chi tiết trang sau: http://www.labnol.org/internet/embed-facebook-messenger-website/29136/

Chủ Nhật, 25 tháng 9, 2016

Code jquery target-blank open new window tab

Then use the post body as the schema.org description, for good G+/FB snippeting. -->
<script type="text/javascript">
$(document).ready(function(){
$("a").each(function() {
var a = new RegExp('/' + window.location.host + '/');
if(a.test(this.href)) {
$(this).click(function(event) {
event.preventDefault();
event.stopPropagation();
window.open(this.href, '_blank');
});
}
});
});
</script>

Code javascript radom ngẫu nhiên hình ảnh quảng cáo khi refesh tab window

Then use the post body as the schema.org description, for good G+/FB snippeting. -->
----------------------- random-banner-refesh window --------------------------------------
<script type="text/javascript">
//Javascript Created by Computerhope http://www.computerhope.com
//store the quotations in arrays
var images = [], 
index = 0;
images[0] = "<a href = 'http://www.computerhope.com/index.htm' target='blank'><img src='https://3.bp.blogspot.com/…/e10MP9mkqWEHo6T…/s1600/v9bet.gif' alt='Visit Computer Hope'></a>";
images[1] = "<a href = 'http://www.computerhope.com/history/index.htm' target='blank'><img src='https://3.bp.blogspot.com/…/__UBZ_jMZfwcl_…/s1600/188bet.gif' alt='Computer History'></a>";
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
//done
</script>
----- end-random-banner-refesh window-----