Without an interface, you can only simulate JSON data yourself.
Just need to simulate some phone numbers, I do not bother to write freely,
Instead of writing a small function to implement a randomly generated phone number
<!DOCTYPE HTML><HTMLLang= "en"><Head> <MetaCharSet= "UTF-8"> <Metaname= "Viewport"content= "Width=device-width, initial-scale=1.0"> <Metahttp-equiv= "X-ua-compatible"content= "Ie=edge"> <title>Randomly generated phone numbers</title> <style>ul Li{List-style:None; } </style></Head><Body> <Buttonclass= "BTN"value="">Start generating phone numbers</Button> <Buttonclass= "BTN1"value="">Stop it</Button> <Buttonclass= "BTN2"value="">Clear page</Button> <ulclass= "Autonum"></ul> <Script> varnn=Document.getelementsbyclassname ("Autonum")[0]; varLilength=document.getElementsByTagName ("Li"); varBtnon=Document.getelementsbyclassname ("btn")[0]; varbtnOn1=Document.getelementsbyclassname ("BTN1")[0]; varbtnOn2=Document.getelementsbyclassname ("btn2")[0]; vartimer; Btnon.addeventlistener ('Click', function() {Console.log ("function StarT"); Timer=SetInterval (function() {autoNum1 (); Autostop (timer); }, -); }, false); Btnon1.addeventlistener ('Click', function() {clearinterval (timer); Console.log (lilength.length); }, false); Btnon2.addeventlistener ('Click', function() {clearinterval (timer); Clearnum (); }, false); //clear all the numbers. functionClearnum () {console.log (lilength.length); for (varI=Lilength.length-1; I>=0; I--) {nn.removechild (nn.childnodes[i]); } } //Stop Timer functionAutostop (timer) {if(Lilength.length> Ten) {clearinterval (timer); Console.log ("By 11, STOP."); } } //automatically generate phone numbers functionautoNum1 () {Console.log ("phone number start generation") varNuM= []; //generate phone numbers from random functions and store them in an array for (varI= 0; I< One; I++) { varNum=Math.floor (Math.random ()* Ten); Num.unshift (num); } //remove the comma from the array by the Join methodNuM=Num.join (""); //determine if the number is the normal number by regular if ((/^1[34578]\d{9}$/. Test (NuM))) { //alert ("found");NuM=num.tostring (); varnode=Document.createelement ("Li"); //Create an Li node varTextnode=document.createTextNode (NuM);//Create a text node contentNode.appendchild (textnode);//Add the contents of the text node to the LI node //document.getElementById ("test"). AppendChild (node), and//Add the Li node to the test under what time //var createnum = "<li>" + NuM + "</p>";nn.appendchild (node); } } </Script></Body></HTML>
JavaScript randomly generates phone numbers via regular