Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- function secondsToTime(secs){
- var hours = Math.floor(secs / (60 * 60));
- var divisor_for_minutes = secs % (60 * 60);
- var minutes = Math.floor(divisor_for_minutes / 60);
- var divisor_for_seconds = divisor_for_minutes % 60;
- var seconds = Math.ceil(divisor_for_seconds);
- return minutes + ":" + seconds;
- }
- function makeposition(){
- if(Math.random()>0.5){
- document.getElementById('type').innerHTML="BUY:USD/GBP";
- }else{
- document.getElementById('type').innerHTML="SHORT:USD/GBP";
- }
- document.getElementById('time').innerHTML=secondsToTime(Math.random()*3600);
- }
- </script>
- <input type="button" value="Generate" onclick="makeposition()"/>
- <li id="type"></li>
- <li id="time"></li>
Advertisement
Add Comment
Please, Sign In to add comment