如何在html+php上实现数字动态变更? 是这样的 比如一个数字A=50 我在一个表单(输入框)

2020-04-16 科技 102阅读




无标题文档</title><br /></head><br /><script type="text/jscript"><br /> window.onload=function(){//页面加载完成后执行函数<br /> var input=document.getElementById("input");//根据id获得输入框对象<br /> var show_input=document.getElementById("value");//根据id获得显示输入内容的对象<br /> input.onkeyup=function(){//在输入框松开键盘按键时执行函数<br /> if(input.value!=""){//如果这个时候输入框里有值则先显示输入值,否则显示请输入数据<br /> show_input.innerHTML="你输入的数据为"+input.value;<br /> }else{<br /> show_input.innerHTML="请输入数据"+input.value;<br /> }<br /> }<br /> }<br /></script><br /><body><br /><input type="text" id="input" value="" /><br /><span id="value">请输入数据</span><br /></div><br /></body><br /></html> </div> <div class="tags"> </div> <div class="clear"> <div class="shares"> <b>声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com</b> <div id="share" class="share-component social-share" data-sites="weibo,qzone,qq,wechat"> </div> </div> <div class="act"> <a href="JavaScript:" onclick="zan('370122782073391404')" class="zan" title="赞"> <i class="iconfont bx bx-like"></i> <span id="zan">0</span> </a> </div> </div> <div class="clear"></div> </div> <div class="ny-ad"> </div> <div class="ny-ad"> </div> <div class="like"> <h3 class="title">最新文章</h3> <div class="piclist likep"> <div class="li"> <div class="img"> <a href="https://w.sf024.com/info/942589595637809572.html" title="惠普(HP)LaserJet MFP M436n打印怎么总提示纸盘1没纸,纸盘2设置保存了也不打印,怎么设置"> <img src="https://w.sf024.com/assets/img/default.jpg" alt=""> </a> </div> <a href="https://w.sf024.com/ask/10" class="cat">科技 </a> <h3> <a href="https://w.sf024.com/info/942589595637809572.html" title="惠普(HP)LaserJet MFP M436n打印怎么总提示纸盘1没纸,纸盘2设置保存了也不打印,怎么设置">惠普(HP)LaserJet MFP M436n打印怎么总提示纸盘1没纸,纸盘2设置保存了也不打印,怎么设置</a> </h3> <div class="meta"> <span class="time"> <i class="iconfont bx bx-time"></i> 04-15 </span> <span class="views"> <i class="iconfont bx bx-show"></i> 2.5万阅读 </span> </div> </div> <div class="li"> <div class="img"> <a href="https://w.sf024.com/info/709929852732135965.html" title="如何做好把一个新产品推向市场"> <img src="https://w.sf024.com/assets/img/default.jpg" alt=""> </a> </div> <a href="https://w.sf024.com/ask/10" class="cat">科技 </a> <h3> <a href="https://w.sf024.com/info/709929852732135965.html" title="如何做好把一个新产品推向市场">如何做好把一个新产品推向市场</a> </h3> <div class="meta"> <span class="time"> <i class="iconfont bx bx-time"></i> 04-16 </span> <span class="views"> <i class="iconfont bx bx-show"></i> 86阅读 </span> </div> </div> <div class="li"> <div class="img"> <a href="https://w.sf024.com/info/1309089613027686979.html" title="西门子冰箱"> <img src="https://w.sf024.com/assets/img/default.jpg" alt=""> </a> </div> <a href="https://w.sf024.com/ask/10" class="cat">科技 </a> <h3> <a href="https://w.sf024.com/info/1309089613027686979.html" title="西门子冰箱">西门子冰箱</a> </h3> <div class="meta"> <span class="time"> <i class="iconfont bx bx-time"></i> 04-16 </span> <span class="views"> <i class="iconfont bx bx-show"></i> 112阅读 </span> </div> </div> <div class="clear"></div> </div> </div> <div class="ny-ad"> </div> </div> <div class="sidebar"> <div class="widget postlist"> <h3>猜你喜欢</h3> <ul class="hasimg"> <li> <a href="https://w.sf024.com/info/370122782073391404.html" title="如何在html+php上实现数字动态变更? 是这样的 比如一个数字A=50 我在一个表单(输入框)" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="如何在html+php上实现数字动态变更? 是这样的 比如一个数字A=50 我在一个表单(输入框)"> </a> <a href="https://w.sf024.com/info/370122782073391404.html" target="">如何在html+php上实现数字...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 04-16 </span><span> <i class="iconfont bx bx-show"></i> 102阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/372328024.html" title="在html中如何动态显示从00到23的数字" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="在html中如何动态显示从00到23的数字"> </a> <a href="https://w.sf024.com/info/372328024.html" target="">在html中如何动态显示从00到...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 05-03 </span><span> <i class="iconfont bx bx-show"></i> 121阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/398671236.html" title="如何在html文件里写php程序?" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="如何在html文件里写php程序?"> </a> <a href="https://w.sf024.com/info/398671236.html" target="">如何在html文件里写php程序...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 04-13 </span><span> <i class="iconfont bx bx-show"></i> 826阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/433537526.html" title="如何让网站首页默认加载index.html而不是index.php,急求" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="如何让网站首页默认加载index.html而不是index.php,急求"> </a> <a href="https://w.sf024.com/info/433537526.html" target="">如何让网站首页默认加载index...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 07-15 </span><span> <i class="iconfont bx bx-show"></i> 85阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/941859857437151092.html" title="如何修复PHP的警告:PHP启动:无法加载动态库'分机\\\ php" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="如何修复PHP的警告:PHP启动:无法加载动态库'分机\\\ php"> </a> <a href="https://w.sf024.com/info/941859857437151092.html" target="">如何修复PHP的警告:PHP启动...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 10-28 </span><span> <i class="iconfont bx bx-show"></i> 167阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/1451022147247769420.html" title="如何让html支持动态引用" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="如何让html支持动态引用"> </a> <a href="https://w.sf024.com/info/1451022147247769420.html" target="">如何让html支持动态引用...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 06-16 </span><span> <i class="iconfont bx bx-show"></i> 80阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/160208864.html" title="如何通过JavaScript动态生成html控件" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="如何通过JavaScript动态生成html控件"> </a> <a href="https://w.sf024.com/info/160208864.html" target="">如何通过JavaScript动态...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 04-22 </span><span> <i class="iconfont bx bx-show"></i> 89阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/1642949091902699740.html" title="PHP如何写一个控制一个数字出现的几率的算法" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="PHP如何写一个控制一个数字出现的几率的算法"> </a> <a href="https://w.sf024.com/info/1642949091902699740.html" target="">PHP如何写一个控制一个数字出现...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 08-12 </span><span> <i class="iconfont bx bx-show"></i> 39阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/458023164.html" title="如何在js文件中写入html代码(即原有html内容在js中但项目中不存在html文件),像是js动态生成html文件。" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="如何在js文件中写入html代码(即原有html内容在js中但项目中不存在html文件),像是js动态生成html文件。"> </a> <a href="https://w.sf024.com/info/458023164.html" target="">如何在js文件中写入html代码...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 04-17 </span><span> <i class="iconfont bx bx-show"></i> 124阅读 </span> </p> </li> <li> <a href="https://w.sf024.com/info/1958053149721589380.html" title="解析Jquery中如何把一段html代码动态写入到DIV中(实例说明)" class="img"> <img src="https://w.sf024.com/assets/img/default.jpg" alt="解析Jquery中如何把一段html代码动态写入到DIV中(实例说明)"> </a> <a href="https://w.sf024.com/info/1958053149721589380.html" target="">解析Jquery中如何把一段ht...</a> <p class="meta"> <span> <i class="iconfont bx bx-time"></i> 09-05 </span><span> <i class="iconfont bx bx-show"></i> 77阅读 </span> </p> </li> </ul> </div> </div> </div> </section><footer class="footer"> <div class="container"> <p class="copyright">COPYRIGHT 2013 - 2024 你问我答网®. ALL RIGHTS RESERVED. | <a href="https://beian.miit.gov.cn/" target="_blank">豫ICP备2020035127号</a></p> </div></footer><script> let search_type="1"; var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?752ceaa2e03e39366ceff9a414a1f6a7"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();</script> <script type="text/javascript" src="https://w.sf024.com/assets/js/jquery.share.min.js"></script> </body> </html>