06 June, 2012

blog မွာ Alert Box ေလးထည့္မယ္

  Alert Box with OK button - OK buttonျဖင့္ ၀င္ခိုင္းသည့္ Alert Message Box ဒါကေတာ့ message alert box ေလပါ၊ ကန္႔သတ္ခ်က္ရွိေသာ Sites/ Blogမ်ားအတြက္ Serious Message Boxမ်ားျဖင့္ ေမးေလ့ရွိသည္။ တခ်ိဳ႔ Sites/ Blogမ်ားမွာ ၾကိဳဆိုမွဳ၊ ေက်းဇူးတင္ေၾကာင္း ေဖာ္ျပလိုမွဳ စသည့္ရည္ရြယ္ခ်က္မ်ားျဖင့္ တင္ျပေလ့ရွိသည္။Alert Box with OK buttonကို ဖန္တီးလိုပါက.

၁။ Blogger ထဲ Sign In၀င္ပါ။ Page Elementsမွ New Gedgetကိုနွိတ္လိုက္ပါ၊ HTML/ JavaScriptကို Addလုပ္ပါ။၂။ ေအာက္ပါ JavaScript Codeကို ကူးယူၿပီး ထည့္သြင္းလိုက္ပါ။

<script type="text/javascript">
alert('You are about to enter an extremely funny site. People who are prone to laughing fits ... Beware!')
</script>
<noscript>Enable javascript in your browser to view an important message.</noscript>

You are about to enter an extremely funny site. People who are prone to alughing fits...Beware!
စာသားေနရာတြင္ မိမိထည့္လိုေသာ စာသားေတြကို ထည့္လိုက္ပါ။

၃။ Save လုပ္ပါ။

Alert Box with Confirmation button - အတည္ျပဳခိုင္သည့္ Alert Message Box


ဒါနဲ႔ ပတ္သတ္ၿပီး Buttonႏွစ္ခုျဖင့္ ေရြးခ်ယ္ခိုင္းပါမည္။ Ok buttonသည့္ အတည္ျပဳက ဤ Site/Blogထဲကို ၀င္မည္။ Cancal buttonသည့္ အတည္မျပဳက တျခား site/Blogျဖင့္ သြားခိုင္းမည္။ အဲဒီအတြက္ Website/ Blog linkကို ထည့္သြင္းရမည္ျဖစ္သည္။


၁။ Blogger ထဲ Sign In၀င္ပါ။ Page Elementsမွ New Gedgetကို ေခၚပါ။ HTML/ JavaScriptကို Addလုပ္ပါ။
၂။ ေအာက္ပါ JavaScript Codeကို ကူးယူၿပီး ထည့္သြင္းလိုက္ပါ။

<script type="text/javascript">
confirm('This site contains explicit contents. Are you sure you want to continue?');
if (confirm('This site contains explicit contents. Are you sure you want to continue?')) {
window.location = "http://tips-for-new-bloggers.blogspot.com/";
}
else {
window.location = "http://www.google.com/";
}
</script>
confirm('This site contains explicit contents. Are you sure you want to continue?'
confirmသည့္ စာဖတ္သူက အနီေရာင္စာသားကို ဖတ္ၿပီး oK buttonႏွိပ္ရန္ ရည္ညြန္းသည္။

if (confirm(This site contains explicit contents. Are you sure you want to continue?
if confirmသည္ စာဖတ္သူက oKႏွိပ္ၿပီး ေနာက္တစ္ဆင့္ ထပ္ႏွိပ္ရန္ အတည္ျပဳခိုင္းမည္။ စာသားေျပာင္းထည့္ႏိုင္သည္။

window locationသည္ oKႏွိပ္က ၀င္ေရာက္မည့္ site/ Blogလိပ္စာကို ထည့္သြင္းေပးရမည္ျဖစ္သည္။
ဒုတိယ window locationသည္ Cancalႏွိပ္ၿပီး ၀င္ေရာက္မည့္ site/Blogလိပ္စာကို ထည့္သြင္းေပးရမည္ ျဖစ္သည္။

၃။ Save ႏွိပ္ပါ။

Alert Box with Prompt field - ေမးခြန္းျဖင့္ စာဖတ္သူ အမည္၊ အေၾကာင္းအရာျဖင့္ ၀င္ေရာက္မွဳ




ဒါက စာဖတ္သူအား informationေတာင္းသည့္ Message fieldျဖစ္သည္။


၁။ Blogger ထဲ Sign In၀င္ပါ။ Page Elementsမွ New Gedgetကို ေခၚပါ။ HTML/ JavaScriptကို Addလုပ္ပါ။
၂။ ေအာက္ပါ JavaScript Codeကို ကူးယူၿပီး ထည့္သြင္းလိုက္ပါ။
 
<script type="text/javascript"> var yourName = prompt("How can we address you?", "Reader");</script>
How can we address you? တြင္ မိမိထည့္လိုေသာ Question
၃။ Saveႏွိပ္လိုက္ပါ။

0 ဦးမွတ္ခ်က္ေရးခဲ့သည္:

Post a Comment

သင္ေရးလိုက္တဲ့ စာတစ္ေၾကာင္းဟာ စာေရးသူအတြက္အားေဆးပါ