blank

mrfdn.com – Beberapa hari terakhir, saya memiliki pertanyaan dalam benak tentang bagaimana cara si pembuat undangan online menampilkan nama tamu undangannya saat url dibuka.

Pagi ini setelah melaksanakan shalat subuh saya berhasil membuat script sederhana untuk memecahkan masalah ini. Alhamdulillah.

Setelah saya ulik ternyata itu bisa dilakukan melalui javascript.

Misalnya url undangan online seperti ini :

undangan.ku/rafi-zora/?namatamu

Saya ingin menampilkan nama tamu yang tertera setelah tanda tanya.

Arti tanda tanya itu sendiri adalah location search query pada URL yang dikenali oleh web secara standar.

Jadi pada file html undangan online kita tambahkan script ini.

<script>const queryString = document.location.search.split("?")[1];document.write(queryString);</script>

Cara menggunakannya mudah saja, cukup tulis formatnya seperti di atas. Pastikan menambahkan tanda tanya ? lalu diikuti nama tamu.

Maka pada layar akan tampil nama tamu undangan.

Script ini memiliki fungsi yang sangat basic dan masih bisa dikembangkan.

<script>const queryString = document.location.search;const urlParams = new URLSearchParams(queryString);const namatamu = urlParams.get('mengundang')document.write(namatamu);</script>

Untuk yang ini url diset menjadi seperti ini, sehingga bisa merender string dengan spasi (nama yang lebih dari 1 kata).

undangan.ku/rafi-zora/?mengundang=rafi ahmad

Kita tidak perlu mengetik %20 untuk set spasi pada nama tamu, karena sudah dikerjakan oleh javascript halaman web ini.

Semoga bermanfaat.

Ref: MDN Url Location – Javascript

Order web invitation undangan online yang keren di myspclday sekarang!

PakarPBN

A Private Blog Network (PBN) is a collection of websites that are controlled by a single individual or organization and used primarily to build backlinks to a “money site” in order to influence its ranking in search engines such as Google. The core idea behind a PBN is based on the importance of backlinks in Google’s ranking algorithm. Since Google views backlinks as signals of authority and trust, some website owners attempt to artificially create these signals through a controlled network of sites.

In a typical PBN setup, the owner acquires expired or aged domains that already have existing authority, backlinks, and history. These domains are rebuilt with new content and hosted separately, often using different IP addresses, hosting providers, themes, and ownership details to make them appear unrelated. Within the content published on these sites, links are strategically placed that point to the main website the owner wants to rank higher. By doing this, the owner attempts to pass link equity (also known as “link juice”) from the PBN sites to the target website.

The purpose of a PBN is to give the impression that the target website is naturally earning links from multiple independent sources. If done effectively, this can temporarily improve keyword rankings, increase organic visibility, and drive more traffic from search results.

Jasa Backlink

Download Anime Batch

Leave a Reply

Your email address will not be published. Required fields are marked *

TOP