- 入会咨询:027-87324910 投诉反馈:13886711155
2019/6/11 10:58:02
点击量:19696
附件列表
";
var footstr = "
";
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');
}