Home  >  Article  >  Web Front-end  >  This can also be regarded as an order generation method

This can also be regarded as an order generation method

巴扎黑
巴扎黑Original
2016-11-25 09:51:191256browse

<!doctype html>
<html> 
<head> 
 <meta charset="UTF-8"> 
  <meta name="Generator" content="EditPlus®"> 
   <meta name="Author" content="">  
   <meta name="Keywords" content=""> 
    <meta name="Description" content=""> 
     <title>Document</title>
       <script type="text/javascript"> 
          getDataId=function(){return new Date().getTime()+getRandomNum(1,10,3)        //return new Date().getTime()//return getRandomNum(1,10,3);};     getRandomNum=function(a,e,k){ 
           var h="";   
               for(var c=0;c<k;c++)  {  
                 var f=e-a;var b=Math.random(); h+=(a+Math.round(b*f)) 
                  } 
                  return h
                  };
                  function aa(){
                  document.getElementById(&#39;aaa&#39;).value=getDataId();
                  }
                  </script>
                   </head>
                    <body>
                      <input type=&#39;button&#39; value="点击" onclick="aa();">
                        <input type=&#39;text&#39; value=&#39;&#39; id="aaa"/>
                         </body>
                         </html>


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn