var banglaDigit = {'0': '০','1': '১','2': '২','3': '৩','4': '৪','5': '৫','6': '৬','7': '৭','8': '৮','9': '৯'};
var dayName = new Array("রবিবার", "সোমবার", "মঙ্গলবার", "বুধবার", "বৃহস্পতিবার", "শুক্রবার", "শনিবার")
var monName = new Array("জানুয়ারী", "ফেব্রুয়ারী", "মার্চ", "এপ্রিল", "মে", "জুন", "জুলাই", "আগষ্ট",
"সেপ্টেম্বর", "অক্টোবর", "নভেম্বর", "ডিসেম্বর")
var now = new Date;
document.write("আজ " + dayName[now.getDay()] + ", " + now.getDate().toString().replace(/[0123456789]/g, function(s) {
return banglaDigit[s];
}) + " " + monName[now.getMonth()] + " " + now
.getFullYear().toString().replace(/[0123456789]/g, function(s) {
return banglaDigit[s];
}) + "ইং ")
date = new Date();
hours = date.getHours();
mins = date.getMinutes();
secs = date.getSeconds();
shift='';
if (hours == 0) {
shift = " AM";
hours = 12
} else if (hours <= 3) {
shift = " AM"
} else if (hours == 12) {
shift = " PM";
hours = 12
} else if (hours >= 13) {
shift = " PM";
hours -= 12
}
if (mins <= 9) {
mins = "0" + mins
}
document.write("* সময়ঃ " + hours.toString().replace(/[0123456789]/g, function(s) {
return banglaDigit[s];
}) + " টা :" + mins.toString().replace(/[0123456789]/g, function(s) {
return banglaDigit[s];
}) + " মিনিট *");
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (2)
You can use an html element that is already in your page and set the
textContent
property.For example:
Assuming the page has this html.
This is what I would do to show some text:
I recommend reading this nice article: Safely inserting external content into a page.
Thank You