我建議你用js來(lái)做。用html引入。那她看也方便。只要用電腦打開(kāi)網(wǎng)頁(yè)就可以看到了。而效果做出來(lái)的比你那個(gè)好!
10年積累的成都網(wǎng)站設(shè)計(jì)、網(wǎng)站建設(shè)經(jīng)驗(yàn),可以快速應(yīng)對(duì)客戶(hù)對(duì)網(wǎng)站的新想法和需求。提供各種問(wèn)題對(duì)應(yīng)的解決方案。讓選擇我們的客戶(hù)得到更好、更有力的網(wǎng)絡(luò)服務(wù)。我雖然不認(rèn)識(shí)你,你也不認(rèn)識(shí)我。但先做網(wǎng)站設(shè)計(jì)后付款的網(wǎng)站建設(shè)流程,更有宣城免費(fèi)網(wǎng)站建設(shè)讓你可以放心的選擇與我們合作。
看一下書(shū)就可以寫(xiě)出你想要的東西了。很快。。加油吧。前年完成決對(duì)沒(méi)有問(wèn)題。ok。
代碼很簡(jiǎn)單,我這里就不多廢話(huà)了,直接奉上源碼:
復(fù)制代碼?代碼如下:
%@?page?language="java"?import="java.util.*"?pageEncoding="UTF-8"%
%
String?path?=?request.getContextPath();
String?basePath?=?request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%
!DOCTYPE?HTML?PUBLIC?"-//W3C//DTD?HTML?4.01?Transitional//EN"
html
head
base?href="%=basePath%"
title喝喝/title
meta?http-equiv="pragma"?content="no-cache"
meta?http-equiv="cache-control"?content="no-cache"
meta?http-equiv="expires"?content="0"????
meta?http-equiv="keywords"?content="keyword1,keyword2,keyword3"
meta?http-equiv="description"?content="This?is?my?page"
!--
link?rel="stylesheet"?type="text/css"?href="styles.css"
--
script
var?imgUrl?=?'
var?lineLink?=?'
var?descContent?=?"萬(wàn)達(dá)狂歡節(jié),?奪寶幸運(yùn)星大抽獎(jiǎng)活動(dòng)開(kāi)始啦!";
var?shareTitle?=?'萬(wàn)達(dá)狂歡節(jié)';
var?appid?=?'wxc9937e3a66af6dc8';
function?shareFriend()?{
WeixinJSBridge.invoke('sendAppMessage',{
"appid":?appid,
"img_url":?imgUrl,
"img_width":?"640",
"img_height":?"640",
"link":?lineLink,
"desc":?descContent,
"title":?shareTitle
},?function(res)?{
_report('send_msg',?res.err_msg);
})
}
function?shareTimeline()?{
WeixinJSBridge.invoke('shareTimeline',{
"img_url":?imgUrl,
"img_width":?"640",
"img_height":?"640",
"link":?lineLink,
"desc":?descContent,
"title":?shareTitle
},?function(res)?{
_report('timeline',?res.err_msg);
});
}
function?shareWeibo()?{
WeixinJSBridge.invoke('shareWeibo',{
"content":?descContent,
"url":?lineLink,
},?function(res)?{
_report('weibo',?res.err_msg);
});
}
//?當(dāng)微信內(nèi)置瀏覽器完成內(nèi)部初始化后會(huì)觸發(fā)WeixinJSBridgeReady事件。
document.addEventListener('WeixinJSBridgeReady',?function?onBridgeReady()?{
//?發(fā)送給好友
WeixinJSBridge.on('menu:share:appmessage',?function(argv){
shareFriend();
});
//?分享到朋友圈
WeixinJSBridge.on('menu:share:timeline',?function(argv){
shareTimeline();
});
//?分享到微博
WeixinJSBridge.on('menu:share:weibo',?function(argv){
shareWeibo();
});
},?false);
/script
/head
body
!--?script
var?imgUrl?=?"
var?lineLink?=?"
var?descContent?=?'測(cè)試別當(dāng)真';
var?shareTitle?=?'分享';
var?appid?=?'wx1259b351c201841d';
function?shareFriend()?{
WeixinJSBridge.invoke('sendAppMessage',{
"appid":?appid,
"img_url":?imgUrl,
"img_width":?"200",
"img_height":?"200",
"link":?lineLink,
"desc":?descContent,
"title":?shareTitle
},?function(res)?{
//_report('send_msg',?res.err_msg);
});
}
function?shareTimeline()?{
WeixinJSBridge.invoke('shareTimeline',{
"img_url":?imgUrl,
"img_width":?"200",
"img_height":?"200",
"link":?lineLink,
"desc":?descContent,
"title":?shareTitle
},?function(res)?{
//_report('timeline',?res.err_msg);
});
}
function?shareWeibo()?{
WeixinJSBridge.invoke('shareWeibo',{
"content":?descContent,
"url":?lineLink,
},?function(res)?{
//_report('weibo',?res.err_msg);
});
}
//?當(dāng)微信內(nèi)置瀏覽器完成內(nèi)部初始化后會(huì)觸發(fā)WeixinJSBridgeReady事件。
document.addEventListener('WeixinJSBridgeReady',?function?onBridgeReady()?{
//?發(fā)送給好友
WeixinJSBridge.on('menu:share:appmessage',?function(argv){
shareFriend();
});
//?分享到朋友圈
WeixinJSBridge.on('menu:share:timeline',?function(argv){
shareTimeline();
});
//?分享到微博
WeixinJSBridge.on('menu:share:weibo',?function(argv){
shareWeibo();
});
},?false);
/script?--
h1呵呵呵呵/h1???????????
/body
/html
建議:做個(gè)word文檔,
1:程序代碼截圖,代碼中必須含有注釋
例如:
System.out.println("******************\n"); //運(yùn)行順序1
System.out.println("\t歡迎進(jìn)入java編程世界"); //運(yùn)行順序2
System.out.println("\n*****************"); //運(yùn)行順序3
然后結(jié)果:
把控制臺(tái)的代碼貼上去
可用打包工具。
在初始窗口中單擊ImportProject,在文件樹(shù)中選擇您的項(xiàng)目,打開(kāi)Import窗口,選擇Eclipseoption,然后單擊Next。導(dǎo)入完成后,主窗口將打開(kāi),項(xiàng)目目錄在左側(cè),編輯區(qū)域在右側(cè)。下圖顯示了目錄樹(shù)結(jié)構(gòu)。人們發(fā)現(xiàn)。已經(jīng)生成了idea目錄和web_test.iml文件,它們是idea的IDE依賴(lài)文件。
選擇左邊的下一個(gè)菜單,模塊,這是idea的概念。模塊包含在項(xiàng)目下。對(duì)了,很多人會(huì)對(duì)這個(gè)概念感到困惑甚至鄙視,但確實(shí)是正確的。它來(lái)自于maven的想法。如果你看過(guò)一些大型開(kāi)源軟件,你就會(huì)知道開(kāi)源nosql的源代碼。一個(gè)項(xiàng)目將被開(kāi)發(fā)成許多模塊。但是對(duì)于常規(guī)的javaweb,不用擔(dān)心那么多,只要明白一個(gè)項(xiàng)目就是一個(gè)模塊,兩者可以合二為一。
做swing的 界面,打成相應(yīng)的.jar文件,發(fā)給別人,人家收到只要安裝虛擬機(jī)應(yīng)該可以雙擊運(yùn)行了。
本文標(biāo)題:如何發(fā)送分享JAVA代碼 java分享功能怎么做
標(biāo)題來(lái)源:http://chinadenli.net/article44/dodisee.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供服務(wù)器托管、網(wǎng)站營(yíng)銷(xiāo)、商城網(wǎng)站、微信公眾號(hào)、網(wǎng)站策劃、軟件開(kāi)發(fā)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶(hù)投稿、用戶(hù)轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話(huà):028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)