當前位置:首頁 » 網頁前端 » web聊天源碼打賞
擴展閱讀
webinf下怎麼引入js 2023-08-31 21:54:13
堡壘機怎麼打開web 2023-08-31 21:54:11

web聊天源碼打賞

發布時間: 2022-09-20 17:09:37

1. 求像「與同時訪問此網站的人聊天」的浮動網頁內聊天窗口的源碼

以下代碼 應該可以調用只要你自己美工下
<!--CTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt-->
<html>
<head>
<title>JavaScript製作的聊天窗口代碼 - www.webdm.cn</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<style type="text/css" media="all" rel="stylesheet">

<!--
body {
text-align:left;
margin:0;
font:normal 12px Verdana, Arial;
background:#FFEEFF
}
form {
margin:0;
font:normal 12px Verdana, Arial;
}
table,input {
font:normal 12px Verdana, Arial;
}
a:link,a:visited{
text-decoration:none;
color:#333333;
}
a:hover{
text-decoration:none;
color:#FF6600
}
#main {
width:400px;
position:absolute;
left:600px;
top:100px;
background:#EFEFFF;
text-align:left;
filter:Alpha(opacity=90)
}
#ChatHead {
text-align:right;
padding:3px;
border:1px solid #003399;
background:#DCDCFF;
font-size:11px;
color:#3366FF;
cursor:move;
}
#ChatHead a:link,#ChatHead a:visited, {
font-size:14px;
font-weight:bold;
padding:0 3px
}
#ChatBody {
border:1px solid #003399;
border-top:none;
padding:2px;
}
#ChatContent {
height:200px;
padding:6px;
overflow-y:scroll;
word-break: break-all
}
#ChatBtn {
border-top:1px solid #003399;
padding:2px
}
-->
</style><script language="javascript" type="text/javascript">
<!--
function $(d){return document.getElementById(d);}
function gs(d){var t=$(d);if (t){return t.style;}else{return null;}}
function gs2(d,a){
if (d.currentStyle){
var curVal=d.currentStyle[a]
}else{
var curVal=document.defaultView.getComputedStyle(d, null)[a]
}
return curVal;
}
function ChatHidden(){gs("ChatBody").display = "none";}
function ChatShow(){gs("ChatBody").display = "";}
function ChatClose(){gs("main").display = "none";}
function ChatSend(obj){
var o = obj.ChatValue;
if (o.value.length>0){
$("ChatContent").innerHTML += "<strong>Akon說:</strong>"+o.value+"<br/>";
o.value='';
}
}
if (document.getElementById){
(
function(){
if (window.opera){ document.write("<input type='hidden' id='Q' value=' '>"); }

var n = 500;
var dragok = false;
var y,x,d,dy,dx;

function move(e)
{
if (!e) e = window.event;
if (dragok){
d.style.left = dx + e.clientX - x + "px";
d.style.top = dy + e.clientY - y + "px";
return false;
}
}

function down(e){
if (!e) e = window.event;
var temp = (typeof e.target != "undefined")?e.target:e.srcElement;
if (temp.tagName != "HTML"|"BODY" && temp.className != "dragclass"){
temp = (typeof temp.parentNode != "undefined")?temp.parentNode:temp.parentElement;
}
if('TR'==temp.tagName){
temp = (typeof temp.parentNode != "undefined")?temp.parentNode:temp.parentElement;
temp = (typeof temp.parentNode != "undefined")?temp.parentNode:temp.parentElement;
temp = (typeof temp.parentNode != "undefined")?temp.parentNode:temp.parentElement;
}

if (temp.className == "dragclass"){
if (window.opera){ document.getElementById("Q").focus(); }
dragok = true;
temp.style.zIndex = n++;
d = temp;
dx = parseInt(gs2(temp,"left"))|0;
dy = parseInt(gs2(temp,"top"))|0;
x = e.clientX;
y = e.clientY;
document.onmousemove = move;
return false;
}
}

function up(){
dragok = false;
document.onmousemove = null;
}

document.onmousedown = down;
document.onmouseup = up;

}
)();
}
-->
</script>
</head>
<body>
<div class="dragclass" id="main" style="LEFT: 588px; TOP: 298px">
<div id="ChatHead"><a onclick="ChatHidden();" href="#">-</a> <a onclick="ChatShow();" href="#">+</a> <a onclick="ChatClose();" href="http://www.webdm.cn">x</a> </div>
<div id="ChatBody">
<div id="ChatContent"></div>
<div id="ChatBtn">
<form action="" method="post" name="chat">
<textarea style="WIDTH: 350px" rows="3" name="ChatValue"></textarea> <input onclick="ChatSend(this.form);" type="button" name="Submit" value="Chat" />
</form>
</div>
</div>
</div>
</body>
</html>

2. 如何實現web聊天室中的私聊功能

環境優美碳聳萍鄉赴禱

3. 在Web上進行視頻通話,示例源碼誰有

你的採納 是我回答的動力!

4. 一對一直播交友源碼平台多少錢

您好!根據我們的開發經驗,一套運營級的完整一對一直播源碼價格在2~3萬,功能主要包含一對一視頻聊天、主播列表、主播介紹詳情及個人中心系統設置等,而且源碼是完全開源的,您可以隨意進行二次開發。

5. WEB新概念網站源碼超市會員如何給賬號充值支持什麼在線支付方式

網銀支付、財付通、支付寶等在線支付手段和傳統的銀行轉賬等方式都可以的!可以預存方式,這樣獲得高級別會員,然後用余額購買比較合算

6. 怎麼實現網頁版的在線聊天啊,用html寫,求源代碼

這純html是寫不出來的 要後台程序語言寫 你可以去網上下載一個 有很多

7. 求一套完整的JAVA WEB項目的網路購物網站源代碼

/**
*@description:
*@authorchenshiqiangE-mail:[email protected]
*@date2014年9月7日下午2:51:50
*@version1.0
*/
packagecom.example.map;

importjava.util.ArrayList;
importjava.util.Collections;
importjava.util.HashSet;
importjava.util.List;
importandroid.app.Activity;
importandroid.os.Bundle;
importandroid.support.v4.view.PagerAdapter;
importandroid.support.v4.view.PagerTabStrip;
importandroid.support.v4.view.ViewPager;
importandroid.text.Editable;
importandroid.util.Log;
importandroid.view.LayoutInflater;
importandroid.view.View;
importandroid.view.ViewGroup;
importandroid.widget.ExpandableListView;
importandroid.widget.ListView;
importcom..mapapi.map.offline.MKOLSearchRecord;
importcom..mapapi.map.offline.MKOLUpdateElement;
importcom..mapapi.map.offline.MKOfflineMap;
importcom..mapapi.map.offline.MKOfflineMapListener;
importcom.example.map.adapters.OfflineExpandableListAdapter;
importcom.example.map.adapters.OfflineMapAdapter;
importcom.example.map.adapters.OfflineMapManagerAdapter;
importcom.example.map.interfaces.;
importcom.example.map.models.OfflineMapItem;
importcom.example.map.utils.CsqBackgroundTask;
importcom.example.map.utils.ToastUtil;
importcom.example.system.R;

istener,
{

//------------------------Constants------------------------

//-------------------------Fields--------------------------

privateViewPagerviewpager;
privatePagerTabStrippagertab;

privateMySearchViewsvDown;
privateListViewlvDown;

privateMySearchViewsvAll;
;
privateListViewlvSearchResult;

privateList<View>views=newArrayList<View>(2);
privateList<String>titles=newArrayList<String>(2);

privateMKOfflineMapmOffline=null;

;
;
;

privateList<OfflineMapItem>itemsDown;//下載或下載中城市
privateList<OfflineMapItem>itemsAll;//所有城市,與熱門城市及下載管理對象相同

privateList<OfflineMapItem>itemsProvince;
privateList<List<OfflineMapItem>>itemsProvinceCity;

//-----------------------Constructors----------------------

//--------Methodsfor/fromSuperClass/Interfaces-----------

@Override
protectedvoidonCreate(BundlesavedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_offline_map);

// finalStringpackname=this.getPackageName();
// PackageInfopackageInfo;
// try
// {
// packageInfo=this.getPackageManager().getPackageInfo(packname,PackageManager.GET_SIGNATURES);
//
//
// if(code==-00)
// {
//初始化離線地圖管理
mOffline=newMKOfflineMap();
mOffline.init(this);

initViews();

viewpager.setCurrentItem(1);
// }
// }
// catch(NameNotFoundExceptione)
// {
// e.printStackTrace();
// }
}

privatebooleanisResumed=false;

@Override
protectedvoidonResume()
{
super.onResume();

if(!isResumed)
{
isResumed=true;
loadData();
}
}

@Override
protectedvoidonDestroy()
{
super.onDestroy();

mOffline.destroy();
}

/**
*
*@authorchenshiqiangE-mail:[email protected]
*@paramtype
*事件類型:MKOfflineMap.TYPE_NEW_OFFLINE,MKOfflineMap.TYPE_DOWNLOAD_UPDATE,MKOfflineMap.TYPE_VER_UPDATE.
*@paramstate
*事件狀態:當type為TYPE_NEW_OFFLINE時,表示新安裝的離線地圖數目.當type為TYPE_DOWNLOAD_UPDATE時,表示更新的城市ID.
*/
@Override
(inttype,intstate)
{
switch(type)
{
caseMKOfflineMap.TYPE_DOWNLOAD_UPDATE:
MKOLUpdateElementupdate=mOffline.getUpdateInfo(state);

if(setElement(update,true)!=null)
{
if(itemsDown!=null&&itemsDown.size()>1)
{
Collections.sort(itemsDown);
}

refreshDownList();

}
else
{
downAdapter.notifyDataSetChanged();
}

allSearchAdapter.notifyDataSetChanged();
allCountryAdapter.notifyDataSetChanged();
break;

caseMKOfflineMap.TYPE_NEW_OFFLINE:
//有新離線地圖安裝
Log.d("OfflineDemo",String.format("addofflinemapnum:%d",state));
break;

caseMKOfflineMap.TYPE_VER_UPDATE:
//版本更新提示
break;
}
}

/**
*網路下載狀態改變(暫停--》恢復)居然不回調,所以改變狀態時自己得增加介面監聽狀態改變刷新界面
*
*@authorchenshiqiangE-mail:[email protected]
*@paramitem
*有狀態改變的item
*@paramremoved
*item是否被刪除
*/
@Override
publicvoidstatusChanged(OfflineMapItemitem,booleanremoved)
{
if(removed)
{
for(inti=itemsDown.size()-1;i>=0;i--)
{
OfflineMapItemtemp=itemsDown.get(i);
if(temp.getCityId()==item.getCityId())
{
itemsDown.remove(i);
}
}
refreshDownList();

}
else
{
loadData();
downAdapter.notifyDataSetChanged();
}

allSearchAdapter.notifyDataSetChanged();
allCountryAdapter.notifyDataSetChanged();
}

//---------------------Methodspublic----------------------

publicvoidtoDownloadPage()
{
viewpager.setCurrentItem(0);
}

//---------------------Methodsprivate---------------------

privatevoidinitViews()
{
//TODO
viewpager=(ViewPager)findViewById(R.id.viewpager);
pagertab=(PagerTabStrip)findViewById(R.id.pagertab);

LayoutInflaterinf=LayoutInflater.from(this);
Viewv1=inf.inflate(R.layout.view_offline_download,null,false);
svDown=(MySearchView)v1.findViewById(R.id.svDown);
lvDown=(ListView)v1.findViewById(R.id.lvDown);
views.add(v1);

Viewv2=inf.inflate(R.layout.view_offline_countrys,null,false);
svAll=(MySearchView)v2.findViewById(R.id.svAll);
lvWholeCountry=(ExpandableListView)v2.findViewById(R.id.lvWholeCountry);
lvSearchResult=(ListView)v2.findViewById(R.id.lvSearchResult);
views.add(v2);

titles.add("下載管理");
titles.add("城市列表");

pagertab.setTabIndicatorColor(0xff00cccc);
pagertab.setDrawFullUnderline(false);
pagertab.setBackgroundColor(0xFF38B0DE);
pagertab.setTextSpacing(50);

viewpager.setOffscreenPageLimit(2);
viewpager.setAdapter(newMyPagerAdapter());

svDown.setSearchListener(newMySearchView.SearchListener()
{
@Override
publicvoidafterTextChanged(Editabletext)
{
refreshDownList();
}

@Override
publicvoidsearch(Stringtext)
{
}
});

svAll.setSearchListener(newMySearchView.SearchListener()
{
@Override
publicvoidafterTextChanged(Editabletext)
{
refreshAllSearchList();
}

@Override
publicvoidsearch(Stringtext)
{
}
});

downAdapter=newOfflineMapManagerAdapter(this,mOffline,this);
lvDown.setAdapter(downAdapter);

allSearchAdapter=newOfflineMapAdapter(this,mOffline,this);
lvSearchResult.setAdapter(allSearchAdapter);

allCountryAdapter=(this,mOffline,this);
lvWholeCountry.setAdapter(allCountryAdapter);
lvWholeCountry.setGroupIndicator(null);
}

/**
*刷新下載列表,根據搜索關鍵字及itemsDown下載管理數量變動時調用
*/
privatevoidrefreshDownList()
{
Stringkey=svDown.getInputText();
if(key==null||key.length()<1)
{
downAdapter.setDatas(itemsDown);

}
else
{
List<OfflineMapItem>filterList=newArrayList<OfflineMapItem>();
if(itemsDown!=null&&!itemsDown.isEmpty())
{
for(OfflineMapItemi:itemsDown)
{
if(i.getCityName().contains(key))
{
filterList.add(i);
}
}
}

downAdapter.setDatas(filterList);
}
}

/**
*刷新所有城市搜索結果
*/
()
{
Stringkey=svAll.getInputText();
if(key==null||key.length()<1)
{
lvSearchResult.setVisibility(View.GONE);
lvWholeCountry.setVisibility(View.VISIBLE);

allSearchAdapter.setDatas(null);

}
else
{
lvSearchResult.setVisibility(View.VISIBLE);
lvWholeCountry.setVisibility(View.GONE);

List<OfflineMapItem>filterList=newArrayList<OfflineMapItem>();
if(itemsAll!=null&&!itemsAll.isEmpty())
{
for(OfflineMapItemi:itemsAll)
{
if(i.getCityName().contains(key))
{
filterList.add(i);
}
}
}

allSearchAdapter.setDatas(filterList);
}
}

privatevoidloadData()
{

newCsqBackgroundTask<Void>(this)
{
@Override
protectedVoidonRun()
{
//TODOAuto-generatedmethodstub
//導入離線地圖包
//將從官網下載的離線包解壓,把vmp文件夾拷入SD卡根目錄下的BaiMapSdk文件夾內。
//把網站上下載的文件解壓,將BaiMapvmpl裡面的.dat_svc文件,拷貝到手機BaiMapSDK/vmp/h目錄下
intnum=mOffline.importOfflineData();
if(num>0)
{
ToastUtil.showToastInfo(BaiOfflineMapActivity.this,"成功導入"+num+"個離線包",false);
}

List<MKOLSearchRecord>all=null;
try
{
all=mOffline.getOfflineCityList();
}
catch(Exceptione)
{
e.printStackTrace();
}
if(all==null||all.isEmpty())
{
ToastUtil.showToastInfo(BaiOfflineMapActivity.this,"未獲取到離線地圖城市數據,可能有其他應用正在使用網路離線地圖功能!",false);
returnnull;
}

List<MKOLSearchRecord>hotCity=mOffline.getHotCityList();
HashSet<Integer>hotCityIds=newHashSet<Integer>();
if(!hotCity.isEmpty())
{
for(MKOLSearchRecordr:hotCity)
{
hotCityIds.add(r.cityID);
}
}

itemsAll=newArrayList<OfflineMapItem>();
itemsDown=newArrayList<OfflineMapItem>();
itemsProvince=newArrayList<OfflineMapItem>();
itemsProvinceCity=newArrayList<List<OfflineMapItem>>();

//cityType0:全國;1:省份;2:城市,如果是省份,可以通過childCities得到子城市列表

//全國概略圖、直轄市、港澳子城市列表
ArrayList<MKOLSearchRecord>childMunicipalities=newArrayList<MKOLSearchRecord>();

proHot.cityName="熱門城市";
proHot.childCities=cs;
List<MKOLUpdateElement>updates=mOffline.getAllUpdateInfo();
if(updates!=null&&updates.size()>0)
{
}

@Override
protectedvoidonResult(Voidresult)
{
//TODOAuto-generatedmethodstub
refreshDownList();
refreshAllSearchList();

allCountryAdapter.setDatas(itemsProvince,itemsProvinceCity);
}
}.execute();
}

8. php+ajax怎麼做web聊天室,就是類似QQ那樣的,求源碼

其實做這個不難完成,只要php學的可以,在懂一點ajax就能做出來了。如樓上說的,用ajax想伺服器端沒隔幾秒發送一次數據,1秒的時候效果最逼真(只是開銷有點大),然後後台讀取資料庫,再返回結果,就實現了。
具體可以參考:http://www.daixiaorui.com/read/12.html
有範例有效果,有源碼。可以去看看!祝你成功!!

9. 哪個有web聊天源碼,就像webQQ聊天的那種,拿錢購買!

csdn上有個我以前看過。具體在哪裡不知道了