文字框插入表情和圖片,文字框插入表情

來源:互聯網
上載者:User

文字框插入表情和圖片,文字框插入表情

<span style="font-size:18px;"><html><title>文字框插入表情和圖片</title><script language ="javascript" type="text/javascript">function InsertPic(picpath){var editor = document.getElementById('txtContent'); var img = document.createElement('img'); img.src = picpath;editor.appendChild(img);  }</script> <body><div>表情:          <img src="img/1.gif" onclick="InsertPic(this.src);"/>          <img src="img/2.gif" onclick="InsertPic(this.src);"/>          <img src="img/3.gif" onclick="InsertPic(this.src);"/>          <img src="img/4.gif" onclick="InsertPic(this.src);"/>  <img src="img/5.gif" onclick="InsertPic(this.src);"/>  <img src="img/6.gif" onclick="InsertPic(this.src);"/>        </div>       <textarea id="txtContent" cols="50" rows="10" runat="server">向textarea插入圖片:</textarea> </body></html></span>


效果如下:



怎在一個多行文字框裡插入表情與圖片

點右鍵沒有添加到QQ表情這一項的解決方案 1、開始——運行——輸入regedit 2、按Ctrl+F,輸入MenuExt (或手動尋找,路徑為:[HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt) 3、右擊"MenuExt"檔案夾——建立——項,項名字為“添加到QQ表情” 4、在右邊“名稱”下第一個表徵圖(上有"ab"字樣)右擊——修改,數值資料填入“安裝盤:\Program Files\Tencent\qq\AddEmotion.htm”(安裝盤為C或D) 5、右邊空白處右擊——建立“DWORD值”,名字為“contexts”,數值資料為“2” 退出登錄編輯程式,重新開啟IE試試,滑鼠右鍵菜單多了一個“添加到QQ表情”吧? 我也這麼做了.重啟IE就有了.你看一下.是不是步驟不對.
 
文字框插入入表情

很簡單的,用不著自己去實現,網上下載個就是了。
很多比如FreeText,HtmlEditor等都是,你說的都是這類線上編輯器,功能都是封裝好在裡面的,你直接調用它的方法就是啦
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.