»
Tiếng AnhTiếng PhápTiếng Việt

In - Menu kiểu gõ dòng lệnh - JavaScriptBank.com

Phiên bản đầy đủ: jsB@nk » Trình đơn » Định hướng » Menu kiểu gõ dòng lệnh
URL: https://www.javascriptbank.com/command-prompt-nav-menu.html

Menu kiểu gõ dòng lệnh © JavaScriptBank.comĐoạn mã này tạo một cửa sổ trong giống như cửa sổ CMD của Windows và có chức năng tương tự, bạn có thể thực hiện một số lệnh cơ bản như in một chuỗi nào đó, hiển thị thời gian hiện tại,...

Phiên bản đầy đủ: jsB@nk » Trình đơn » Định hướng » Menu kiểu gõ dòng lệnh
URL: https://www.javascriptbank.com/command-prompt-nav-menu.html



CSS
<STYLE type=text/css>BODY {BACKGROUND-COLOR: rgb(0,100,150)}SPAN#titlebar {BACKGROUND-COLOR: darkblue; BORDER-BOTTOM: gray 2px inset; BORDER-LEFT: gray 2px inset; BORDER-RIGHT: gray 2px inset; BORDER-TOP: gray 2px inset; COLOR: white; CURSOR: move; HEIGHT: 20px; LEFT: 320px; POSITION: absolute; TEXT-ALIGN: left; TOP: 80px; VISIBILITY: visible; WIDTH: 500px; Z-INDEX: 2}SPAN#prompt {BACKGROUND-COLOR: black; COLOR: #00ff00; HEIGHT: 200px; LEFT: 320px; OVERFLOW: scroll; POSITION: absolute; TEXT-ALIGN: left; TOP: 100px; VISIBILITY: visible; WIDTH: 500px; Z-INDEX: 2}INPUT#iput {BACKGROUND-COLOR: transparent; BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; BORDER-RIGHT: 0px; BORDER-TOP: 0px; COLOR: #00ff00; POSITION: relative; WIDTH: 445px; Z-INDEX: 3}A {COLOR: lightyellow}A:hover {BACKGROUND-COLOR: black}</STYLE><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<SCRIPT language=JavaScript type=text/javascript><!--// - optionX = URLX// example: option1 = URL1, option2 = URL2 , option3 = URL3var option1="Home",option2="3D",option3="Background",option4="Image",option5="Text",option6="Link";var URL1="http://JavaScriptBank.com/",URL2="http://JavaScriptBank.com",URL3="http://JavaScriptBank.com",URL4="http://JavaScriptBank.com",URL5="http://JavaScriptBank.com",URL6="http://JavaScriptBank.com";////////////////////////////////////////////////////////////////////////////////////var bool=false;if(navigator.appName=="Netscape")document.captureEvents(Event.MOUSEMOVE);window.document.onmousemove=follow;window.document.onmouseup=returnFalse;function returnTrue(){  bool=true;}function follow(e){  if(bool) {   with(document.getElementById('titlebar').style) {     left=(navigator.appName=='Netscape')?e.pageX-240:event.clientX-240;   top=(navigator.appName=='Netscape')?e.pageY:event.clientY; } with(document.getElementById('prompt').style) {     left=(navigator.appName=='Netscape')?e.pageX-240:event.clientX-240;   top=(navigator.appName=='Netscape')?e.pageY+20:event.clientY+20; } }}function returnFalse(){  bool=false;if(document.getElementById('prompt').style.visibility!='hidden')document.getElementById('iput').focus();}///////////////////////////////////////////////////////////////////////////////function clearI(){  document.getElementById('iput').value="";}function returnResult(){ var echo=document.getElementById('menu'); var ans=document.getElementById('iput').value; ans=ans.toLowerCase(); switch(ans) {  case '':case ' ':case '?':case '/?':case 'm':case 'menu': case 'click enter button below . . .':case 'help':case 'man':  echo.innerHTML="~ Menu ~<br />--------<br />H = "+option1+"<br />C = "+option2+"<br />F = "+option3+"<br />T = "+option4+"<br />A = "+option5+"<br />S = "+option6+"<br />DS:\\>";break;case 'cmd':case 'ver':  echo.innerHTML="<br />http://jsbank.topcities.com [Version ?.x.?.x.?.x]<br /><div style='visibility:hidden'>_</div>DS:\\>";  break;case 'h':  window.open(URL1);  break;case 'c':  window.open(URL2);  break;case 'f':  window.open(URL3);break;case 't':  window.open(URL4);break;case 'a':  window.open(URL5);break;case 's':  window.open(URL6);break;case 'net share':  echo.innerHTML="Scripts - Shared<br />DS:\\>";  break;case 'net user':case 'who':  echo.innerHTML="You<br />DS:\\>";break;case 'net view':  echo.innerHTML="'The Internet'<br />DS:\\>";break;case 'ipconfig':case 'ipconfig /all':  echo.innerHTML="media state connected:<br />IP Address: xxx-xxx-xxx-xxx<br />Subnet Mask: ???<br />Default Gateway: xxx-xxx-xxx-xxx<br />DS:\\>";break;case 'time':case 'date':  var day=new Date();echo.innerHTML="Current Time: "+day.getHours()+":"+day.getMinutes()+":"+day.getSeconds()+"<br />"+"Current Date: "+day.getMonth()+"/"+day.getDate()+"/"+day.getYear()+"<br />DS:\\>";break;default:  if(ans.substring(8,0)=="net send")  echo.innerHTML="Error, this message Alias could not be found on the Network.<br />DS:\\>"else if(ans.substring(6,0)=="prompt")   echo.innerHTML=ans.substring(7,ans.length);else if(ans.substring(7,0)=="tracert")  echo.innerHTML="A Hop, Skip and a Jump...<br />DS:\\>";else if(ans.substring(4,0)=="ping")  echo.innerHTML="Pinging 127.0.0.1 with 32 bytes of data:<br /><br />Reply from 127.0.0.1: bytes=32 time<br /><1ms TTL=128 Reply from 127.0.0.1: bytes=32 time<br /><1ms TTL=128Reply from 127.0.0.1: bytes=32 time<br /><1ms TTL=128Reply from 127.0.0.1: bytes=32 time<br /><1ms TTL=128Ping statistics for 127.0.0.1:Packets: <br /><br />Sent = 4, Received = 4, Lost = 0 (0% loss)<br />DS:\\>";else if(ans.substring(8,0)=="nslookup")  echo.innerHTML="Server: ???<br />Address: xxx-xxx-xxx-xxx<br />JSB:\\>";else   echo.innerHTML="JSB:\\>"; } clearI();}//--></SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<DIV><SPAN id=titlebar onmousedown=returnTrue() onmouseup=returnFalse()><code>JavaScriptBank.com/menu/cmd.exe</code></SPAN><SPAN id=prompt></DIV><TT id=menu>JSBank [Version ?.x.?.x.?.x] JSB:\&gt;</TT><INPUT id=iput value="Click Enter Button Below . . ." size="20"><BR><INPUT onclick=returnResult(); style="FONT-WEIGHT: bold" type=button value=Enter>    </PRE><BR></SPAN><p></DIV><TT style="COLOR: white; FONT-SIZE: 12px"></p><PRE><A  onclick="document.getElementById('titlebar').style.visibility='hidden';document.getElementById('prompt').style.visibility='hidden';">Hide</A><A href onclick="document.getElementById('titlebar').style.visibility='visible';document.getElementById('prompt').style.visibility='visible';">Show</A>Step 1:&nbsp; Click Enter Button on ScreenStep 2:&nbsp; Type in a Letter From the List of OptionsCommands:&nbsp; Menu = Menu&nbsp; Time = Current Time and Date&nbsp; Date = Current Time and Date&nbsp; Ver = Version&nbsp; Prompt xxxx = Prompts xxxx on screen&nbsp; cls = Clear Screen*Menu May be Moved By Clicking and Dragging the Title Bar of the CMD Prompt</PRE></TT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->