注:這篇文章可以取到介面中的資料,不過要求jsp和伺服器端介面在同乙個工程中,為了解決跨域問題可以參詳
本人的這篇文章:
注意:工程中引入jquery-latest.js檔案
var id='';
var murl='';
murl=murl+'?id='+id;
$(function() {
$.post(murl,function(data){
var json=eval("(" + data + ")");
//alert(data);
var det=''+json["detail"][0].prodname +'
';det=det+'
';det=det+'喜歡:'+json["detail"][0].loves+' '+'';
det=det+'¥'+json["detail"][0].prodprice+' 去看看
';$("#bpicture").html(det);
//alert(json["detail"][0].sharepllist.length);
var coms='';
if((json["detail"][0].sharepllist.length)>0){
for(var i=0;i
coms=coms+''+json["detail"][0].sharepllist[i].content;
coms=coms+' 來自:'+json["detail"][0].sharepllist[i].username +' '+json["detail"][0].sharepllist[i].createtime+'
html頁面中的**:
id="bpicture" >
id="pl" >
socket伺服器端
伺服器 include winsock2.h include string.h include stdio.h include time.h include stdarg.h include stdlib.h pragma comment lib,ws2 32 void errexit const ...
kerberos伺服器端
1.安裝tcl wget tar zvxf tcl8.5.12 src.tar.gz cd tcl8.5.12 cd unix configure make make install 3.解壓 tar xvf krb5 1.10.3 signed.tar tar zvxf krb5 1.10.3.t...
C tcp伺服器端
伺服器端 include stdafx.h include winsock2.h pragma comment lib,ws2 32.lib include using namespace std int tmain int argc,char ar 建立套接字 sserver socket af ...