Forum Sementara Putera.com

Bersama kita perkemaskan forum ini sementara forum asal dalam pemulihan.

Forum putera dah kembali. Masalah sudah berjaya diselesaikan. Sila lawati http://forum.putera.com/tanya


    Tambah Javascript Dalam Template Blogspot

    Share

    class_sick
    Ahli Baharu
    Ahli Baharu

    Number of posts : 65
    Registration date : 01/03/2009

    Tambah Javascript Dalam Template Blogspot

    Post by class_sick on Mon Jun 08, 2009 10:24 am

    Salam.
    kawan2,nak minta tlg skit.
    ku nak letak javascript dlm template blogspot tp dia kuar error mcm kat bwh nie

    We were unable to save your template
    Please correct the error below, and submit your template again.
    Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
    XML error message: The entity name must immediately follow the '&' in the entity reference.


    java sript yg ku nak letak tu mcm kat bwh nie

    Code:
    <script language="JavaScript">

            var fixd;

            function isGregLeapYear(year)
            {
                    return year%4 == 0 && year%100 != 0 || year%400 == 0;
            }

            function gregToFixed(year, month, day)
            {
                    var a = Math.floor((year - 1) / 4);
                    var b = Math.floor((year - 1) / 100);
                    var c = Math.floor((year - 1) / 400);
                    var d = Math.floor((367 * month - 362) / 12);

                    if (month <= 2)
                            e = 0;
                    else if (month > 2 && isGregLeapYear(year))
                            e = -1;
                    else
                            e = -2;

                    return 1 - 1 + 365 * (year - 1) + a - b + c + d + e + day;
            }

            function Hijri(year, month, day)
            {
                    this.year = year;
                    this.month = month;
                    this.day = day;
                    this.toFixed = hijriToFixed;
                    this.toString = hijriToString;
            }

            function hijriToFixed()
            {
                    return this.day + Math.ceil(29.5 * (this.month - 1)) + (this.year - 1) * 354 +
                            Math.floor((3 + 11 * this.year) / 30) + 227015 - 1;
            }

            function hijriToString()
            {
                    var months = new Array("Muharam","Safar","Rabi\'ul Awal","Rabiul Akhir","Jamadil Awal","Jamadil Akhir","Rajab","Sha\'ban","Ramadhan","Shawwal","Dzulka\'edah","Dzulhijjah");
              return this.day + " " + months[this.month - 1]+ " " + this.year;
            }

            function fixedToHijri(f)
            {
              var i=new Hijri(1100, 1, 1);
              i.year = Math.floor((30 * (f - 227015) + 10646) / 10631);
              var i2=new Hijri(i.year, 1, 1);
              var m = Math.ceil((f - 29 - i2.toFixed()) / 29.5) + 1;
              i.month = Math.min(m, 12);
              i2.year = i.year;
                    i2.month = i.month;
                    i2.day = 1;
              i.day = f - i2.toFixed() + 1;
              return i;
            }

            var tod=new Date();
            var weekday=new Array("Ahad","Isnin","Selasa","Rabu","Khamis","Jumaat","Sabtu");
            var monthname=new Array("Januari","Februari","Mac","April","Mei","Jun","Julai","Ogos","September","Oktober","November","Disember");

            var y = tod.getFullYear();
            var m = tod.getMonth();
            var d = tod.getDate();
            var dow = tod.getDay();
            document.write(weekday[dow] + " " + d + " " + monthname[m] + " " + y);
            m++;
            fixd=gregToFixed(y, m, d);
            var h=new Hijri(1421, 11, 28);
            h = fixedToHijri(fixd);
            document.write(" | " + h.toString() + " Hijrah");

          </script>


    ku try letak coding lain kat bhgian tu ok jer.tp bila nak letak javascript dia kuar error mcm tu.

    ke mmg xboleh letak javascript dlm template blogspot?

    Thanks

    OngBok
    Moderators
    Moderators

    Gender : Male Number of posts : 729
    Location : Dungun Terengganu
    Job/hobbies : Pesara JKR
    Registration date : 18/02/2009

    Re: Tambah Javascript Dalam Template Blogspot

    Post by OngBok on Mon Jun 08, 2009 12:14 pm

    Aku cuba letak dalam blog aku. ok jer.
    http://duniapcku.blogspot.com/2009/06/javascript-tarikh.html

    class_sick
    Ahli Baharu
    Ahli Baharu

    Number of posts : 65
    Registration date : 01/03/2009

    Re: Tambah Javascript Dalam Template Blogspot

    Post by class_sick on Mon Jun 08, 2009 4:22 pm

    klo letak dlm post mmg boleh.
    ku nak letak dlm template.
    kiranyer dekat bahagian menu kat atas belah kiri.

    mfaizal2008
    Ahli Baharu
    Ahli Baharu

    Gender : Male Number of posts : 217
    Age : 36
    Location : Cyberjaya
    Job/hobbies : Technician
    Registration date : 01/03/2009

    Re: Tambah Javascript Dalam Template Blogspot

    Post by mfaizal2008 on Wed Jul 15, 2009 10:24 am

    jangan lupa, kalau guna blogspot, pastikan klik kat Expand Widget Templates sblm masukkan skrip.

    jangan lupa masuk blog aku kalo nak belajar cmne nak buat duit dengan blog:
    http://janawangdariblog.blogspot.com/

    senarai e-book percuma utk korang

    Panduan Membuat Blog Dengan Blogger
    Preview Percuma Panduan Asas Blogger
    100 Cara Untuk Tingkatkan Web Trafik Anda
    Tag & Ping: Rahsia Menguasai Trafik Yang Tak Terhingga Dari Enjin Carian
    Ketahui Rahsia Menjana Wang Dengan Google Adsense
    Laporan Percuma Google Adsense
    3 Idea Buat Duit Di Blog
    4 Langkah Mudah Menjana Pendapatan Sampingan Dengan Nuffnang
    Panduan Langkah Demi Langkah Jana Pendapatan Dengan Nuffnang
    Panduan Percuma Nuffnang - Rahsia Jana Trafik & Wang

    Sponsored content

    Re: Tambah Javascript Dalam Template Blogspot

    Post by Sponsored content Today at 8:30 am


      Current date/time is Mon Dec 05, 2016 8:30 am