Prompt

  다른 뜻에 대해서는 프롬프트 문서를 참조하십시오.
  다른 뜻에 대해서는 텍스트 상자 문서를 참조하십시오.
prompt
gets.chomp
Prompt Box
InputBox

1 JavaScript[ | ]

var person = prompt("What is your name?");
var person = prompt("Please enter your name", "Harry Potter");

2 Python[ | ]

name = input("What is your name? ")
print( name )
# What is your name? John Smith
# John Smith

3 Ruby[ | ]

print "What is your name? "
name = gets.chomp

4 Visual Basic[ | ]

title = "InputBox Demo"
message = "What is your name?" 
defaultValue = "Harry Potter"
myValue = InputBox(message, title, defaultValue)

5 Perl[ | ]

print "What is your name? ";
my $person = <STDIN>;
chomp $person;
print "$person\n";
# What is your name? John Smith
# John Smith

6 Windows Batch[ | ]

@echo off
set /p person="What is your name? "
echo %person%
rem What is your name? John Smith
rem John Smith

7 POSIX Shell[ | ]

echo -n "What is your name? "
read name
echo $name
rem What is your name? John Smith
rem John Smith

8 같이 보기[ | ]

9 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}