1. Buka Vb 6.0
2. New Project Standard EXE
3. Tambahkan 2 buah TextBox & 2 buah CommandButton
4. Copas code berikut :
Private Sub Command1_Click()
Dim code1 As String
code1 = ""
code1 = code1 & "<SCRIPT language='JavaScript'>alert("""
code1 = code1 & Text1.Text
code1 = code1 & """"
code1 = code1 & ");</SCRIPT>"
Text2.Text = code1
End Sub
Private Sub Command2_Click()
Text1 = ""
Text2 = ""
Text1.SetFocus
End Sub
5. Jalankan dengan menekan tombol F5
Demo : JS-creator
0 komentar:
Posting Komentar