백엔드 개발 PHP 튜토리얼 留言板下表情的添加

留言板下表情的添加

Jun 13, 2016 am 10:59 AM
gt lt nbsp this

留言板上表情的添加
就是点击表情按钮,会弹出类似QQ表情的框,这是怎么做的呀?
是不是要用到插件呀??我有一个插件portraitSelect.htm,可是不知道要怎么用,

谁有类似的代码,发出来给我看看呗!!感谢大家
------最佳解决方案--------------------
我幫你用jquery寫好了

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br /><html xmlns="http://www.w3.org/1999/xhtml"><br /><head><br /><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><br /><title> - </title><br /><script type='text/javascript' src="@bak/jquery-1.5.2.min.js"></script><br /><script type='text/javascript'><br />(function($){<br />	//擴展方法<br />		$.pop=function(_this,_type,_mess,_P,_tim,_script){<br />		$("#p_o").remove();<br />		if(_type){<br />			var Loc;<br />			if(typeof(_this)=='object'){<br />				_this=_this;<br />			}else{<br />				_this="#"+_this;<br />			}<br />			if(!_this){return;}<br /><br />			try{<br />				Loc=$(_this).offset();<br />				_T=Loc.top;<br />				oW=$(_this).css("width");<br />			}catch(e){}<br /><br />			popcss='<style type="text/css">';<br />			popcss+='#p_o{width:auto;left:'+Loc.left+'px;background-color:#ECECCA;border:1px solid #B39F82;padding:1px;position:absolute;display:block;z-index:9999;opacity:0.95;}';<br />			popcss+='#p_o div{background-color:#FEFEEA;padding:2px;}';<br />			popcss+='#p_o .i{background:url("/img/pop.gif") no-repeat scroll 0 0 transparent;}';<br />			popcss+='#p_o .r{word-wrap:break-word;padding:5px;margin:0;line-height:20px;color:#AF7132;}';<br />			popcss+='</style>';<br /><br />			$("body").prepend('<div id="p_o">'+popcss+'<div><p class="r">'+_mess+'</p></div><span class="i p"></span></div>');<br /><br />			_T=_T+parseInt($("#p_o").css("height"))/2;<br />			$("#p_o").css("top",_T);<br />			if(_tim){window.setTimeout('$("#p_o").remove();',_tim);}<br />			if(_script){eval("("+_script+")");}<br />		}else{<br />			$("#p_o").remove();<br />		}<br />	}<br />})(jQuery)<br /><br /><br /><br />$(function(){<br />	$('#c1').click(function(){<br />		_img=$('#img').html();<br />		$.pop($(this),'show',_img);<br />	})<br />   <br />	$('#c2').click(function(){<br />		$('#t1').attr('readonly');<br />	})<br />});<br /></script><br /></head><br /><br /><body><br /><input value="添加表情" id="c1"><br /><div id='img'><br /><img  src='1.jpg'    style="max-width:90%"  style="max-width:90%" alt="留言板下表情的添加" ><img  src='2.jpg'    style="max-width:90%"  style="max-width:90%" alt="留言板下表情的添加" ><br /></div><br /></body><br /></html>
로그인 후 복사

------其他解决方案--------------------
var someValue=window.showModalDialog();
获取返回值 赋值给相应的文本框

------其他解决方案--------------------
在fckeditor  里有表情 自定义;可以借来用哦
------其他解决方案--------------------

引用:
var someValue=window.showModalDialog();
获取返回值 赋值给相应的文本框

这样就行
这个方法有很多,不要被qq表情给局限住了,随便弄个div排好版,根据js操作就可以的
------其他解决方案--------------------
谢谢大家,4楼的方法可以展示出图片,但是选不中图片,再帮我看看呗
------其他解决方案--------------------
这个我也想学习,能不能教一教
------其他解决方案--------------------
null
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.

뜨거운 기사 태그

메모장++7.3.1

메모장++7.3.1

사용하기 쉬운 무료 코드 편집기

SublimeText3 중국어 버전

SublimeText3 중국어 버전

중국어 버전, 사용하기 매우 쉽습니다.

스튜디오 13.0.1 보내기

스튜디오 13.0.1 보내기

강력한 PHP 통합 개발 환경

드림위버 CS6

드림위버 CS6

시각적 웹 개발 도구

SublimeText3 Mac 버전

SublimeText3 Mac 버전

신 수준의 코드 편집 소프트웨어(SublimeText3)

해결 방법: 조직에서 PIN 변경을 요구합니다. 해결 방법: 조직에서 PIN 변경을 요구합니다. Oct 04, 2023 pm 05:45 PM

해결 방법: 조직에서 PIN 변경을 요구합니다.

Windows 11에서 창 테두리 설정을 조정하는 방법: 색상 및 크기 변경 Windows 11에서 창 테두리 설정을 조정하는 방법: 색상 및 크기 변경 Sep 22, 2023 am 11:37 AM

Windows 11에서 창 테두리 설정을 조정하는 방법: 색상 및 크기 변경

Windows 11에서 제목 표시줄 색상을 변경하는 방법은 무엇입니까? Windows 11에서 제목 표시줄 색상을 변경하는 방법은 무엇입니까? Sep 14, 2023 pm 03:33 PM

Windows 11에서 제목 표시줄 색상을 변경하는 방법은 무엇입니까?

Windows 11에서 작업 표시줄 축소판 미리 보기를 활성화 또는 비활성화하는 방법 Windows 11에서 작업 표시줄 축소판 미리 보기를 활성화 또는 비활성화하는 방법 Sep 15, 2023 pm 03:57 PM

Windows 11에서 작업 표시줄 축소판 미리 보기를 활성화 또는 비활성화하는 방법

Windows 11/10 복구의 OOBELANGUAGE 오류 문제 Windows 11/10 복구의 OOBELANGUAGE 오류 문제 Jul 16, 2023 pm 03:29 PM

Windows 11/10 복구의 OOBELANGUAGE 오류 문제

화웨이 GT3 Pro와 GT4의 차이점은 무엇입니까? 화웨이 GT3 Pro와 GT4의 차이점은 무엇입니까? Dec 29, 2023 pm 02:27 PM

화웨이 GT3 Pro와 GT4의 차이점은 무엇입니까?

Windows 11의 디스플레이 크기 조정 가이드 Windows 11의 디스플레이 크기 조정 가이드 Sep 19, 2023 pm 06:45 PM

Windows 11의 디스플레이 크기 조정 가이드

Windows 11에서 밝기를 조정하는 10가지 방법 Windows 11에서 밝기를 조정하는 10가지 방법 Dec 18, 2023 pm 02:21 PM

Windows 11에서 밝기를 조정하는 10가지 방법

See all articles