"MessageBox"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-source +syntaxhighlight))
 
8번째 줄: 8번째 줄:
==ActionScript==
==ActionScript==
[[category: ActionScript]]
[[category: ActionScript]]
<source lang='actionscript'>
<syntaxhighlight lang='actionscript'>
import mx.controls.Alert;
import mx.controls.Alert;


15번째 줄: 15번째 줄:
   Alert.show("Hello World!");
   Alert.show("Hello World!");
}
}
</source>
</syntaxhighlight>


==C#==
==C#==
[[category: Csharp]]
[[category: Csharp]]
<source lang="csharp">
<syntaxhighlight lang="csharp">
System.Windows.Forms.MessageBox.Show("Hello World!");
System.Windows.Forms.MessageBox.Show("Hello World!");
</source>
</syntaxhighlight>
<source lang="csharp">
<syntaxhighlight lang="csharp">
MessageBox.Show("Hello World!");
MessageBox.Show("Hello World!");
</source>
</syntaxhighlight>


==Java==
==Java==
30번째 줄: 30번째 줄:
===ADT===
===ADT===
[[Category: ADT]]
[[Category: ADT]]
<source lang='java'>
<syntaxhighlight lang='java'>
new AlertDialog.Builder(this)
new AlertDialog.Builder(this)
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
36번째 줄: 36번째 줄:
})
})
.show();
.show();
</source>
</syntaxhighlight>
<source lang='java'>
<syntaxhighlight lang='java'>
new AlertDialog.Builder(this)
new AlertDialog.Builder(this)
.setIcon(R.drawable.ic_launcher)
.setIcon(R.drawable.ic_launcher)
46번째 줄: 46번째 줄:
})
})
.show();
.show();
</source>
</syntaxhighlight>


==JavaScript==
==JavaScript==
[[Category: JavaScript]]
[[Category: JavaScript]]
<source lang="javascript">
<syntaxhighlight lang="javascript">
alert("Hello World!");
alert("Hello World!");
</source>
</syntaxhighlight>


==jQuery==
==jQuery==
[[category:jQuery]]
[[category:jQuery]]
;jQuery UI
;jQuery UI
<source lang='html5'>
<syntaxhighlight lang='html5'>
<script>
<script>
$(function() {
$(function() {
66번째 줄: 66번째 줄:
     <p>Hello</p>
     <p>Hello</p>
</div>
</div>
</source>
</syntaxhighlight>


==Objective-C==
==Objective-C==
[[Category: Objective-C]]
[[Category: Objective-C]]
;iOS SDK
;iOS SDK
<source lang='objc'>
<syntaxhighlight lang='objc'>
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Alert"
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Alert"
message:@"Hello World!"
message:@"Hello World!"
79번째 줄: 79번째 줄:
[alertView show];
[alertView show];
[alertView release];
[alertView release];
</source>
</syntaxhighlight>


==VB==
==VB==
[[Category: VB]]
[[Category: VB]]
<source lang="VB">
<syntaxhighlight lang="VB">
MsgBox "Hello World!"
MsgBox "Hello World!"
</source>
</syntaxhighlight>
<source lang="VBnet">
<syntaxhighlight lang="VBnet">
MessageBox.Show("Hello World!", "Alert", MessageBoxButtons.OK)
MessageBox.Show("Hello World!", "Alert", MessageBoxButtons.OK)
</source>
</syntaxhighlight>


==See also==
==See also==

2020년 11월 2일 (월) 02:39 기준 최신판

MessageBox
MsgBox
Alert
AlertDialog
UIAlertView

1 ActionScript[ | ]

import mx.controls.Alert;

private function init():void
{		
  Alert.show("Hello World!");
}

2 C#[ | ]

System.Windows.Forms.MessageBox.Show("Hello World!");
MessageBox.Show("Hello World!");

3 Java[ | ]

3.1 ADT[ | ]

new AlertDialog.Builder(this)
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
	public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); }
})
.show();
new AlertDialog.Builder(this)
.setIcon(R.drawable.ic_launcher)
.setTitle("Title")
.setMessage("Message")
.setPositiveButton("OK", new DialogInterface.OnClickListener() {
	public void onClick(DialogInterface dialog, int which) { dialog.dismiss(); }
})
.show();

4 JavaScript[ | ]

alert("Hello World!");

5 jQuery[ | ]

jQuery UI
<script>
$(function() {
  $( "#dialog" ).dialog();
});
</script>
<div id="dialog" title="Alert">
    <p>Hello</p>
</div>

6 Objective-C[ | ]

iOS SDK
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Alert"
	message:@"Hello World!"
	delegate:self
	cancelButtonTitle:@"OK"
	otherButtonTitles:nil];
[alertView show];
[alertView release];

7 VB[ | ]

MsgBox "Hello World!"
MessageBox.Show("Hello World!", "Alert", MessageBoxButtons.OK)

8 See also[ | ]

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