El código es muy simple, no hablaré muchas tonterías aquí, solo presentará el código fuente:
La copia del código es la siguiente:
<%@ page idioma = "java" import = "java.util.*" PageEncoding = "UTF-8"%>
<%
String ruta = request.getContextPath ();
String basepath = request.getScheme ()+": //"+request.getServerName ()+":"+request.getServerPort ()+ruta+"/";
%>
<! Doctype html público "-// w3c // dtd html 4.01 transitional // en">
<html>
<Evista>
<base href = "<%= basepath%>">
<title> bebida </title>
<meta http-equiv = "pragma" content = "no-cache">
<meta http-oquiv = "cache-control" content = "no-cache">
<meta http-oquiv = "expires" content = "0">
<meta http-equiv = "Keywords" content = "Keyword1, Keyword2, Keyword3">
<meta http-oquiv = "descripción" content = "esta es mi página">
<!-
<link rel = "stylesheet" type = "text/css" href = "styles.css">
->
<script>
var imgurl = 'http://qqfood.tc.qqq.com/meishio/16/4585bf7c-be04-420f-ac8a-2dba61a7561f/0';
var linelink = 'http://life.qq.com/weixin/r/lottery/13826036970196242008#wechat_redirect';
Var DescContent = "Wanda Carnival, ¡la lotería del tesoro afortunado ha comenzado!";
var sharetitle = 'Wanda Carnival';
var appid = 'wxc9937e3a66af6dc8';
function sharefriend () {
Weixinjsbridge.invoke ('sendappMessage', {
"Appid": Appid,
"img_url": imgurl,
"img_width": "640",
"img_height": "640",
"Enlace": Linelink,
"Desc": Desccontent,
"Título": Sharetitle
}, función (res) {
_report ('send_msg', res.err_msg);
})
}
function shareTimeline () {
Weixinjsbridge.invoke ('shareTimeline', {
"img_url": imgurl,
"img_width": "640",
"img_height": "640",
"Enlace": Linelink,
"Desc": Desccontent,
"Título": Sharetitle
}, función (res) {
_report ('timeline', res.err_msg);
});
}
función shareWeibo () {
Weixinjsbridge.invoke ('shareWeibo', {
"Contenido": Desccontent,
"URL": Linelink,
}, función (res) {
_report ('weibo', res.err_msg);
});
}
// Cuando el navegador WeChat incorporado completa la inicialización interna, se activará el evento WeixInjsbridgeReady.
document.addeventListener ('weixinjsbridgeReady', function onbridgeReady () {
// Enviarlo a amigos
Weixinjsbridge.on ('menú: share: appMessage', function (argv) {
Sharefriend ();
});
// Compartir con amigos
Weixinjsbridge.on ('menú: share: timeline', function (argv) {
ShareTimeline ();
});
// Compartir en Weibo
Weixinjsbridge.on ('menú: share: weibo', function (argv) {
ShareWeibo ();
});
}, FALSO);
</script>
</ablo>
<Body>
<!- <script>
var imgurl = "http://tkfeng.hk.myjsp.wang/jianwuye/img/avatar1.jpg";
var linelink = "http://tkfeng.hk.myjsp.wang/jianwuye/login.html";
var descontent = 'no tome la prueba en serio';
var sharetitle = 'share';
var appid = 'wx1259b351c201841d';
function sharefriend () {
Weixinjsbridge.invoke ('sendappMessage', {
"Appid": Appid,
"img_url": imgurl,
"img_width": "200",
"img_height": "200",
"Enlace": Linelink,
"Desc": Desccontent,
"Título": Sharetitle
}, función (res) {
// _ Report ('send_msg', res.err_msg);
});
}
function shareTimeline () {
Weixinjsbridge.invoke ('shareTimeline', {
"img_url": imgurl,
"img_width": "200",
"img_height": "200",
"Enlace": Linelink,
"Desc": Desccontent,
"Título": Sharetitle
}, función (res) {
// _ Informe ('Timeline', res.err_msg);
});
}
función shareWeibo () {
Weixinjsbridge.invoke ('shareWeibo', {
"Contenido": Desccontent,
"URL": Linelink,
}, función (res) {
// _ Informe ('Weibo', res.err_msg);
});
}
// Cuando el navegador WeChat incorporado completa la inicialización interna, se activará el evento WeixInjsbridgeReady.
document.addeventListener ('weixinjsbridgeReady', function onbridgeReady () {
// Enviarlo a amigos
Weixinjsbridge.on ('menú: share: appMessage', function (argv) {
Sharefriend ();
});
// Compartir con amigos
Weixinjsbridge.on ('menú: share: timeline', function (argv) {
ShareTimeline ();
});
// Compartir en Weibo
Weixinjsbridge.on ('menú: share: weibo', function (argv) {
ShareWeibo ();
});
}, FALSO);
</script> ->
<h1> jajaja </h1>
</body>
</html>
¿No es muy útil? ¿Amigos? Todos lo embellecen y lo usan en sus propios proyectos