- 入會咨詢:125641455 投訴反饋:13886711155
2019/6/11 14:55:54
點擊量:5522
附件列表
";
var newstr = document.getElementById(printpage).innerHTML;
var oldstr = document.body.innerHTML;
document.body.innerHTML = headstr+newstr + footstr;
// document.body.innerHTML = newstr;
// console.log(headstr + newstr + footstr)
window.print();
document.body.innerHTML = oldstr;
return false;
}
function doPrint() {
bdhtml = window.document.body.innerHTML;
sprnstr = "";
eprnstr = "";
prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr) + 17);
prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr));
window.document.body.innerHTML = prnhtml;
window.print();
location.reload();
//document.body.innerHTML = bdhtml;
}
//字體控制
//$('.dy_con p').dytips_r({
// btnMinusClasseId: '#dytips_r-m2',
// btnDefaultClasseId: '#dytips_r-d2',
// btnPlusClasseId: '#dytips_r-p2',
// btnMinusMaxHits: 1,
// btnPlusMaxHits: 5,
// sizeChange: 2
//});
//$(function () {
// var S = $('.dy_con p').css("font-size");
// $('.dy_con p').css("font-size", "16px");
//})
//$("#dytips_r-m2").click(function () {
// var size = $('.dy_con p').css("font-size");
// $('.dy_con p').css("font-size", size + "!important");
//})
//$("#dytips_r-d2").click(function () {
// var size = $('.dy_con p').css("font-size");
// $('.dy_con p').css("font-size", size + "!important");
//})
//$("#dytips_r-p2").click(function () {
// var size = $('.dy_con p').css("font-size");
// $('.dy_con p').css("font-size", size + "!important");
//})
/**
* 分享QQ好友
* @param {[type]} title [分享标題]
* @param {[type]} url [分享url鍊接,默認當前頁面鍊接]
* @param {[type]} pic [分享圖片]
* @return {[type]} [description]
*/
function shareQQ(url, title, pic) {
var param = {
url: url || window.location.href,
desc: '', /*分享理由*/
title: title || '', /*分享标題(可選)*/
summary: '',/*分享描述(可選)*/
pics: pic || '',/*分享圖片(可選)*/
flash: '', /*視頻地址(可選)*/
site: '' /*分享來源 (可選) */
};
var s = [];
for (var i in param) {
s.push(i + '=' + encodeURIComponent(param[i] || ''));
}
var targetUrl = "https://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?" + s.join('&');
window.open(targetUrl, 'qq', 'height=520, width=720');
}
/**
* 微信分享
* @return {[type]} [description]
*/
function weixin() {
if (jQuery("#qrcode").attr("style") != "display:block") {
$("#qrcode").qrcode({
width: 256,
height: 256,
text: window.location.href
}).attr("style", "display:block")
}
}
/**
* 分享新浪微博
* @param {[type]} title [分享标題]
* @param {[type]} url [分享url鍊接,默認當前頁面]
* @param {[type]} pic [分享圖片]
* @return {[type]} [description]
*/
//jQuery("#share1").click(function () {
//})
function sinaWeiBo(title, url, pic) {
var param = {
url: url || window.location.href,
type: '3',
count: '1', /** 是否顯示分享數,1顯示(可選)*/
appkey: '', /** 您申請的應用appkey,顯示分享來源(可選)*/
title: title, /** 分享的文字内容(可選,默認為所在頁面的title)*/
pic: pic || '', /**分享圖片的路徑(可選)*/
ralateUid: '', /**關聯用戶的UID,分享微博會@該用戶(可選)*/
rnd: new Date().valueOf()
}
var temp = [];
for (var p in param) {
temp.push(p + '=' + encodeURIComponent(param[p] || ''))
}
var targetUrl = 'http://service.weibo.com/share/share.php?' + temp.join('&');
window.open(targetUrl, 'sinaweibo', 'height=430, width=400');
}