可浮動的在線qq咨詢客服代碼
當(dāng)前位置:點晴教程→知識管理交流
→『 技術(shù)文檔交流 』
在給大家推薦了《[url=http://ijavascript.cn/share/float-drag-js-for-qqonline-20.html]qq在線客服代碼可以拖動浮動[/url]》然后又推薦了《[url=http://ijavascript.cn/share/float-drag-js-for-qqonline-30.html]qq在線咨詢代碼上下浮動型[/url]》之后,有朋友問我有沒有簡單點的可浮動的在線qq咨詢客服代碼,其實是有的,我先賣個關(guān)子說說原理。算了還是上傳個在線qq咨詢客服代碼的演示圖片吧。如下圖:[br][img]http://ijavascript.cn/admincp/attachment.php?aid=8[/img][br]樣子很難看,但是這就是非常簡潔的浮動qq客服代碼了,其實最簡單的qq在線客服代碼還是[url=http://imis.qq.com/webpresence/code.shtml]http://imis.qq.com/webpresence/code.shtml[/url]官方的,不過不能浮動。等下提供源程序的打包下載。[br]先看浮動部分的代碼,這個floaters函數(shù)就是讓一個div元素浮動
function floaters() {[br]this.items = [];[br]this.additem = function(id,x,y,content) {[br]document.write('
'+content+' ');[br][br]var newitem = {};[br]newitem.object = document.getelementbyid(id);[br]newitem.x = x;[br]newitem.y = y;[br][br]this.items[this.items.length] = newitem;[br]}[br]this.play = function() {[br]collection = this.items[br]setinterval('play()',10);[br]}[br]}然后是顯示部分的代碼,play這個函數(shù)是控制在線qq咨詢客服代碼的顯示的:
function play() {[br]if(screen.width<=800) {[br]for(var i=0;i該文章在 2010/4/27 1:51:26 編輯過 |
關(guān)鍵字查詢
相關(guān)文章
正在查詢... |