亚洲免费乱码视频,日韩 欧美 国产 动漫 一区,97在线观看免费视频播国产,中文字幕亚洲图片

      1. <legend id="ppnor"></legend>

      2. 
        
        <sup id="ppnor"><input id="ppnor"></input></sup>
        <s id="ppnor"></s>

        js實(shí)現(xiàn)文本框中輸入文字頁面中div層同步獲取文本框內(nèi)容的方法

        字號:


            這篇文章主要介紹了js實(shí)現(xiàn)文本框中輸入文字頁面中div層同步獲取文本框內(nèi)容的方法,實(shí)例分析了javascript操作dom元素的技巧,需要的朋友可以參考下
            本文實(shí)例講述了js實(shí)現(xiàn)文本框中輸入文字頁面中div層同步獲取文本框內(nèi)容的方法。分享給大家供大家參考。具體實(shí)現(xiàn)方法如下:
            代碼如下:
            <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
            <html xmlns="">
            <head>
            <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
            <title>文本框中輸入文字,頁面中div層同步獲取文本框內(nèi)容</title>
            <style>
            textarea{width:300px;height:150px; border:1px solid #CCC; font-size:12px; color:#000;}
            p{ padding-left:30px; text-indent:-30px;width:270px;height:250px; border:1px solid #900; margin-top:50px; font-size:12px; color:#F00; line-height:21px; overflow:hidden}
            </style>
            <script type="text/javascript">
            function SwapTxt()
            {
            var txt = document.getElementById("eml").value;
            document.getElementById("lyny").innerHTML=txt;
            }
            </script>
            </head>
            <body>
            <textarea name="" cols="" rows="" id="eml" onkeyup="SwapTxt()"></textarea>
            <p id="lyny">代碼家園提示:請?jiān)谏厦娴奈谋究蛑休斎胛淖?,?gt;
            </body>
            </html>
            希望本文所述對大家的javascript程序設(shè)計(jì)有所幫助。