{"id":63480,"date":"2020-04-09T15:00:06","date_gmt":"2020-04-09T07:00:06","guid":{"rendered":"http:\/\/4563.org\/?p=63480"},"modified":"2020-04-09T15:00:06","modified_gmt":"2020-04-09T07:00:06","slug":"%e6%b1%82%e5%8a%a9%e5%89%8d%e7%ab%af%ef%bc%8cinput%e5%ae%9e%e6%97%b6%e7%9b%91%e5%90%ac%ef%bc%8c%e4%b9%9f%e5%b0%b1%e6%98%af%e5%ad%97%e4%bd%93%e7%bd%91%e7%ab%99%e7%9a%84%e5%8e%9f%e7%90%86","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=63480","title":{"rendered":"\u6c42\u52a9\u524d\u7aef\uff0cinput\u5b9e\u65f6\u76d1\u542c\uff0c\u4e5f\u5c31\u662f\u5b57\u4f53\u7f51\u7ad9\u7684\u539f\u7406"},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>\u8e74\u97a0<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-3-18 09:52:17\t<\/p>\n<h3>\u6c42\u52a9\u524d\u7aef\uff0cinput\u5b9e\u65f6\u76d1\u542c\uff0c\u4e5f\u5c31\u662f\u5b57\u4f53\u7f51\u7ad9\u7684\u539f\u7406<\/h3>\n<p>  \t\t\u6253\u7b97\u505a\u4e2a\u9875\u9762\uff0c\u6210\u81ea\u5df1\u7684\u5c0f\u5b57\u4f53\u7f51\u3002<\/p>\n<p>  \u4f46\u662f\u5728<br \/>  &lt;\/head&gt;<br \/>  &lt;body&gt;<br \/>  &lt;center&gt;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; <br \/>  &lt;a class=&quot;Lisalovely&quot;style=&quot;font-size:80px&quot;&gt;Font&lt;\/a&gt;<br \/>  &nbsp; &nbsp;&lt;br&gt;&lt;input type=&quot;text&quot; id=&quot;text&quot; class=&quot;box effect1&quot;\/&gt;&lt;button id=&quot;btn&quot; class=&quot;btn paper-raise&quot;&gt;\u786e\u5b9a&lt;\/button&gt;<br \/>  &nbsp; &nbsp; &lt;aid=&quot;div&quot; class=&quot;Lisalovely&quot;&gt;&lt;\/a&gt;<br \/>  &nbsp; &nbsp; &lt;\/center&gt;<br \/>  &nbsp; &nbsp; &lt;\/body&gt;<br \/>  &lt;\/html&gt;<br \/>  &lt;script type=&quot;text\/javascript&quot;&gt;<br \/>  &nbsp; &nbsp; var btn=document.getElementById(&quot;btn&quot;);<br \/>  &nbsp; &nbsp; btn.onclick=function(){<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;var text=document.getElementById(&quot;text&quot;);<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;var div=document.getElementById(&quot;div&quot;);<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;div.innerHTML=text.value;<br \/>  &nbsp; &nbsp;&nbsp; &nbsp;\/\/div.innerHTML+=&quot;&quot;+text.value;\/\/\u5982\u679c\u4e0d\u6e05\u7a7adiv\u7684\u5185\u5bb9\u7528\u8fd9\u4e2a<br \/>  &nbsp; &nbsp; }<br \/>  &lt;\/script&gt;<br \/>  \u8fd9\u4e2aJS\u51fa\u4e86\u95ee\u9898\uff0c\u53ea\u8bc6\u522b\u4e00\u4e2aID\uff0c\u5c31\u6ca1\u529e\u6cd5\u7528\u4e0d\u540c\u7684CSS\u6765\u591a\u5b57\u4f53\u663e\u793a\u3002<\/p>\n<p>  \u6c42\u95ee\u5927\u4f6c\uff0c\u6211\u8981\u600e\u4e48\u624d\u80fd\u8f93\u51fa\u6210\u4e0d\u540c\u7684CSS\u663e\u793a\u3002\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>ruthbaldwin<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-3-18 10:19:24\t<\/p>\n<h3><\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 ruthbaldwin \u4e8e 2020-3-18 10:40 \u7f16\u8f91 <\/p>\n<p> HTML:<br \/>  &lt;div class=&quot;font1 font-preview&quot;&gt;FONT1&lt;\/div&gt;<br \/>  &lt;div class=&quot;font2 font-preview&quot;&gt;FONT2&lt;\/div&gt;<br \/>  &lt;input id=&quot;textInput&quot;&gt;<\/p>\n<p>  CSS:<br \/>  .font1 {<br \/>  font-family: &quot;Times New Roman&quot;, Times, serif;<br \/>  }<\/p>\n<p>  .font2 {<br \/>  font-family: Arial, Helvetica, sans-serif;<br \/>  }<\/p>\n<p>  JS:<br \/>  document.getElementById(&#8216;textInput&#8217;).oninput = ({ target: { value } }) =&gt; {<br \/>  for (const e of document.getElementsByClassName(&#8216;font-preview&#8217;)) {<br \/>  &nbsp; &nbsp; e.textContent = value;<br \/>  }<br \/>  }<\/p>\n<p>  \u5728\u7ebf\u6f14\u793a:<br \/>  https:\/\/jsfiddle.net\/g3y2zLeh\/\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>hasamol7468<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-3-18 09:52:52\t<\/p>\n<h3><\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 hasamol7468 \u4e8e 2020-3-18 10:08 \u7f16\u8f91 <\/p>\n<p> :lol \u200b\u662f\u200b\u6211\u200b\u7684\u200b\u77e5\u200b\u8bc6\u200b\u76f2\u200b\u533a\u200b\u4e86 \u200b\u697c\u200b\u4e0b\u200b\u5927\u200b\u4f6c\u200b\u89e3\u200b\u7b54\u200b\u5427 \u200b\u200b\u200b\u200b<br \/>  \uff08\u6b63\u5e38\u6765\u8bf4\u4e00\u4e2a\u9875\u9762\u53ea\u80fd\u4e00\u4e2aID\u5427 \u8fd9\u4e2a\u53ef\u80fd\u9700\u8981\u901a\u8fc7class\u83b7\u53d6\uff1f\uff09<br \/>  &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>  &lt;center&gt;<br \/>  &lt;a class=&quot;Lisalovely&quot;style=&quot;font-size:80px&quot;&gt;Font&lt;\/a&gt;<br \/>  &nbsp; &nbsp; &lt;div&gt;&lt;input type=&quot;text&quot; class=&quot;box effect1&quot;\/&gt;&lt;button id=&quot;btn&quot; class=&quot;btn paper-raise&quot;&gt;\u786e\u5b9a&lt;\/button&gt;&lt;\/div&gt;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &lt;div&gt;&lt;button class=&quot;btn paper-raise&quot;&gt;\u786e\u5b9a&lt;\/button&gt;&lt;\/div&gt;<br \/>  &nbsp; &nbsp; &lt;div id=&quot;div&quot; class=&quot;Lisalovely&quot;&gt;&lt;\/div&gt;<br \/>  &nbsp; &nbsp; &lt;\/center&gt;<br \/>  &nbsp; &nbsp; &lt;\/body&gt;<br \/>  &lt;\/html&gt;<br \/>  &lt;script type=&quot;text\/javascript&quot;&gt;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; var btn=document.getElementsByClassName(&quot;btn paper-raise&quot;);<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; console.log(btn);<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; var i;\/*\u901a\u8fc7\u904d\u5386\u7ed9\u6bcf\u4e2aclass\u662fbtn paper-raise\u7684\u5143\u7d20\u8bbe\u5b9aonclick*\/<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; for (i = 0; i &lt; btn.length; i++) {<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; btn.onclick=function(){<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var text=document.getElementById(&quot;text&quot;);<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var div=document.getElementById(&quot;div&quot;);<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; div.innerHTML=&quot;\u4f60\u8f93\u5165\u4e86\uff1a&quot;+text.value;<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/\/div.innerHTML+=&quot;&quot;+text.value;\/\/\u5982\u679c\u4e0d\u6e05\u7a7adiv\u7684\u5185\u5bb9\u7528\u8fd9\u4e2a<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br \/>  &nbsp; &nbsp; &nbsp; &nbsp; }<br \/>  &lt;\/script&gt;<br \/>  \u517c\u5bb9\u6027\u672a\u77e5\uff0c\u611f\u89c9\u8fd8\u662fjquery\u7684\u9009\u62e9\u5668\u8212\u670d\u54c8\u54c8<br \/>  $(&quot;.btn&quot;)\u6216\u8005$(&quot;.paper-raise&quot;)\u5c31\u80fd\u641e\u5b9a\u54c8\u54c8\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>zxzf<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-3-18 09:53:50\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u697c\u4e0b\u4e00\u5b9a\u6709\u4f1a\u7684yc008t\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u7e41\u82b1\u4f3c\u9526<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-3-18 09:55:22\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u7528VUE\u6846\u67b6\u5427\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>Evan<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-3-18 09:55:30\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u4ec0\u9ebd\u610f\u601d\uff1f\u9ede\u64ca\u4e0d\u540c\u7684\u6309\u9215\u6539\u8b8a\u5b57\u9ad4\uff1f\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u8e74\u97a0<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-3-18 09:58:47\t<\/p>\n<h3><\/h3>\n<p>  \t\tEvan \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-3-18 09:55<br \/>  \u4ec0\u9ebd\u610f\u601d\uff1f\u9ede\u64ca\u4e0d\u540c\u7684\u6309\u9215\u6539\u8b8a\u5b57\u9ad4\uff1f<\/p>\n<p> \u5c31\u662f\u6211\u628a\u6bcf\u4e00\u4e2a\u5b57\u4f53\u505a\u6210CSS\uff0c\u7136\u540e\u6211\u6709\u4e2ainput\u6846\uff0c\u6211\u5728\u8fd9\u4e2a\u6846\u91cc\u9762\u8f93\u5165\u5185\u5bb9\uff0c\u7136\u540e\u9875\u9762\u4e2d\u7684CSS\uff0c\u5c31\u5b9e\u65f6\u663e\u793a\u6211\u8f93\u5165\u7684\u5185\u5bb9\u3002\u5c31\u7b49\u4e8e\u6211\u53ef\u4ee5\u5b9e\u65f6\u9884\u89c8\u6211\u8fd9\u4e9b\u5b57\u4f53\u51fa\u6765\u662f\u4ec0\u4e48\u6837\u5b50\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u8e74\u97a0<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-3-18 10:05:51\t<\/p>\n<h3><\/h3>\n<p>  \t\thasamol7468 \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-3-18 09:52<br \/>  \u200b\u662f\u200b\u6211\u200b\u7684\u200b\u77e5\u200b\u8bc6\u200b\u76f2\u200b\u533a\u200b\u4e86 \u200b\u697c\u200b\u4e0b\u200b\u5927\u200b\u4f6c\u200b\u89e3\u200b\u7b54\u200b\u5427&nbsp; &nbsp;\u200b\u200b\u200b\u200b<br \/>  \uff08\u6b63\u5e38\u6765\u8bf4\u4e00\u4e2a\u9875\u9762\u53ea\u80fd &#8230;<\/p>\n<p> \u8c22\u8c22\u8001\u54e5\uff0c\u6211\u8bd5\u8bd5\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>yrj<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-3-18 10:06:39\t<\/p>\n<h3><\/h3>\n<p>  \t\t\u4f60\u7528\u4e86 click\u4e8b\u4ef6\uff0c\u6240\u4ee5\u662f\u70b9\u51fb\u540e\u89e6\u53d1\u4e8b\u4ef6\u800c\u4e0d\u662f\u5b9e\u65f6\u3002\u518d\u6709\uff0c\u4f60\u7684\u4ee3\u7801\u5c31\u662f\u628a\u4e00\u6bb5input\u5185\u5bb9\u653e\u8fdba\u6807\u7b7e\uff0c\u6ca1\u770b\u5230\u4f60\u8bf4\u7684css\u4e4b\u7c7b\u7684\u64cd\u4f5c\u3002\u4f60\u7684\u6f14\u793ademo\u662f\u4e0d\u662f\u7cbe\u7b80\u8fc7\u5ea6\u4e86\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u8e74\u97a0<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-3-18 10:38:50\t<\/p>\n<h3><\/h3>\n<p>  \t\truthbaldwin \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-3-18 10:19<br \/>  HTML:<\/p>\n<p> \u611f\u8c22\u5927\u4f6c\t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8e74\u97a0 \u5927\u4f6c\u6709\u8bdd\u8bf4 : 2020-3&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/63480"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=63480"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/63480\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=63480"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=63480"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=63480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}