2 methods to create Alert popup window to Texts


Lihat dan hitung, seberapa banyak aplikasi Android yang Anda instal di smartphone Anda? 

Pernahkah terbersit di benak Anda bagaimana cara membuat aplikasi-aplikasi tersebut?

Apakah Anda Saat Ini Ingin Sekali Bisa Bikin Aplikasi Android Sendiri? Seperti aplikasi game edukasi, media pembelajaran, aplikasi berbasis sensor, aplikasi multimedia, dan lain sebagainya?

Tetapi

1. Tidak Ngerti Coding
2. Tidak Tahu Computer Programming
3. Tidak Paham Bahasa Pemrograman Android
4. Dan Sama Sekali Bukan Lulusan IT?

Jangan Khawatir ...
Ternyata, bikin aplikasi Android itu SANGAT MUDAH, bahkan bagi Pemula sekalipun.

Sekarang Anda bisa bikin aplikasi Android dengan Cepat, bahkan TANPA HARUS CODING.

Tak peduli apapun latar belakang Anda, bikin aplikasi Android itu MUDAH, semudah bermain Puzzle.

Anda Hanya Perlu 4 Langkah berikut ini :

1. Drag & drop komponen-komponen yang dibutuhkan
2. Percantik tampilan aplikasi dengan mengatur layout dan desain tampilan
3. Susun blok-blok kode programnya, dan
4. Build aplikasi Anda jadi file instalasi *.APK

Lantas, Bagimana Cara Memulainya?
Mudah kok, karena sudah hadir untuk Anda Di Sini :


Video tutorial yang membahas cara membuat aplikasi Android dengan sangat MUDAH, CEPAT, & TANPA CODING menggunakan tools App Inventor 2. 
I have explained you how to display a warning box when your blog loads.Today I thought to explain you how to add pop up window for a text.You can add an alert message in to any word,image even letter or number.It is useful when you want to display some description about a topic.You can use "title" attribute to do this matter.But sometimes it is not appropriate.Because when you display long characters,codes or numbers,people can't see it clearly.It also they should hover on it to see the text.i.e: Hover Here.When,you want to tell some thing to viewers clearly,you can use Alert pop up windows for it like this.Click Here.


Add Alert pop up window for Text


You can add Alert box for text by using two ways.I will explain these both methods.

Adding JavaScript codes in an external file or external code


When you want to use one alert box in different places,you can use this method.It saves your time and easy to do.Actually,we now use only function javaScript code.You just need to create a function with your text which is displaying on Alert box.Then link it with a text using <div> or <span> tags.

Note:-you can use other HTML tags too like <p>,<h1><h2>.....<h6>,<img>,<a>.... 

Characters on alert box is not depended on the type of HTML elements or tags.You can see a structure of a alert box.
<script type="text/javascript">
 function Function_name() {
alert("Content of Popup window.");
}
</script>

<div onclick="Function_name()"> Text..</div>

This is main and basic anatomy of a Alert Box.you can use above JavaScript codes for different places.Just put above JavaScript codes and link it on different texts.First you have to make below changes.

Replace Function_name with any word for the function identification name. Don't put "blanks/spaces" between the Function Id. You can use numbers,symbols and hyphens for separate them like I did in above structure.

You can type any code,text instead of Content of Popup window.

You will use any other suitable HTML elements instead of </div> tag.Text.. is the displaying word(s) in the web page.

You can use above function id (Function_name) for any times with any tag.Example of this given below.


<script type="text/javascript"> 
 function Des_body_tag() {  
alert("<body> tag is a HTML (Hypertext Markup Language) element.its closing tag is the </body>.All the codes between the <body> tag is visible to everyone.<body> element is a required tag for every web page..."); 

</script>

<span onclick=" Des_body_tag()" style="color:green;font-style:italic;font-weight:bold;"> <body></span>

Preview:-
<body>


Adding Javascript code inside the Element.


This method is mostly used in working on a single element.you can't use this method to link another tag.because,it is inside the HTML elements.sometimes this method is easy to use,but the disadvantage is the typing JavaScript code in every element which you wish to add popup window.You don't need to add function name here.Look at below for its basic structure.

<div onclick ="alert('content goes Here...');">Text in displaying...</div>

You see that this method is useful when adding a popup window to single element.This method can be used on your website or blog on source code editor.These both methods are useful in different phases.You can see a example of this method in below.codes for it is below,

<div onclick ="alert('Hey,I told you that do not click here know...');" style="color: #0E9193;font-family:'times new roman',helvetica;font-style:italic;font-weight:bold;">Don't click Here !</div>

Don't click Here !

Try these both two methods.If you have any question feel free to ask me anything.Stay tuned with for my next post connections.That's all.Good day for everyone !

Pengelola Blog : ABDUL WAHAB

Judul : 2 methods to create Alert popup window to Texts
Ditulis oleh : Kejutan Internet pada hari
Rating Blog : 5 dari 5
Terima kasih Anda telah membaca artikel tentang 2 methods to create Alert popup window to Texts
Anda boleh menyebar luaskannya atau mengcopy paste-nya jika artikel ini sangat bermanfaat bagi Blog dan teman-teman anda.
Namun jangan lupa harap memberikan link aktif dofollow yang mengarah ke URL ini ya
https://kejutaninternet.blogspot.com/2013/04/2-methods-to-create-alert-popup-window.html

Dan Terima kasih sekali lagi atas kunjungan Anda.

Kritik dan saran atau apapun bisa anda sampaikan melalui kotak komentar.
Dan mohon maaf jika komentar atau pertanyaan tidak bisa cepat saya respon,
karena Saya tidak bisa selalu online selama 24 Jam.


Mau Di Buatkan Blog Siap Pakai Seperti Ini ?.

Artikel Terkait

Previous
Next Post »