script link otomatis dengan combo box di php

script link otomatis dengan combo box di php

Script link dengan bahasa pemrograman php biasanya dibuat dengan menggunkan sintax

<a href=”>kliklink</a>

ketika di klik tulisan kliklink nya akan menuju ke halaman sesuai dengan lokasi href nya. Namun link juga bisa dibuat dengan menggunakan combo box pilihan dengan javascript. Sebagai contoh kita buat sebuah combo box kecamatan yang isinya gresik dan surabaya. Apabila pilihan di list combo box gresik kita pilih akan otomatis menuju halaman khusus alamat yang ada di kecamatan gresik.

<a href=”>kliklink</a> ketika di klik tulisan kliklink nya akan menuju ke halaman sesuai dengan lokasi href nya. Namun link juga bisa dibuat dengan menggunakan combo box pilihan dengan javascript. Sebagai contoh kita buat sebuag combo box kecamatan yang isinya gresik dan surabaya. Apabila pilihan di list combo box gresik kita pilih akan otomatis menuju halaman khusus alamat yang ada di kecamatan gresik.

Contoh script link dengan menggunakan combo box adalah sebagai berikut,

<head>
<script type="text/javascript">
    document.getElementsByName('Pilihan')[0].onchange = function() {
        document.location.href = this.options[this.selectedIndex].value;
    }
</script>
</head>
<body>
 
<form name="myForm" action="" method="post">
 
<select name="kecamatan" onchange="document.location = this.options[this.selectedIndex].value;" style="width:100%;height:50px;float: center;border-radius: 8px;">
   <option value="index.php?id=gresik">Gresik</option>
   <option value="index.php?id=kebomas">Kebomas</option>  
</select>
 
<br><br>
<?php
 
if($id=='gresik'){//pilih gresik
  echo "selama datang di kecamatan gresik";
}
if($id=='kebomas'){//pilih gresik
  echo "selama datang di kecamatan kebomas";
}
 
?>
 
</form>
</body>

Baris ke 2-6 script javacript yang disisipkan dibagian head
Baris ke 12 menambahkan metode onchange untuk menuju lokasi link dengan combo box

Jangan lupa untuk menjalankanya kita buat sebuat file baru di direktori webserver misalnya dengan nama linkcombo.php. Kemudian copi paste kode seperti di atas lalu save. Jalankan web browser bisa menggunakan chorme atau mozile dan ketikkan alamat => localhost/linkcombo.php

Source Code Bridging BPJS dengan simrs

Source Code Bridging BPJS dengan simrs tutorial php lengkap untuk bridging bpjs dengan simrs agag sulit kita dapatkan diinternet. Namun Read more

Tutorial Codeigniter Gratis Membangun Sistem Informasi Akademik

Tutorial Codeigniter Gratis Membangun Sistem Informasi Akademik Codeigniter adalah salah satu framework yang bisa digunakan untuk membuat aplikasi dengan menggunakan Read more

Source Code Aplikasi PHP Gratis untuk Mengelola Berkas di Tempat Kerja

Source Code Aplikasi PHP Gratis untuk Mengelola Berkas di Tempat Kerja Aplikasi ini berfungsi untuk mengelompokkan file document secara digital Read more

Download PHP Sistem Pakar Penyakit Manusia Berbasis Web

Download PHP Sistem Pakar Penyakit Manusia Berbasis Web Sistem pakar atau dalam bahasa Inggris disebut dengan Expert System adalah sebuah Read more

83 Replies to “script link otomatis dengan combo box di php”

  1. Cialis Kaufen In Deutschland

  2. payprox says:

    https://buypropeciaon.com/ – buy generic propecia uk

  3. Piopoky says:

    http://buystromectolon.com/ – injectable ivermectin

  4. Zithromax says:

    Acide Clavulanique Grossesse

  5. rurcild says:

    https://buyplaquenilcv.com/ – where can i buy plaquenil without a doctor prescription

  6. PaysfuG says:

    https://buyneurontine.com/ – gabapentin for dogs side effects

  7. Prednisone says:

    Where Can I Buy Dutasteride Quick Shipping

  8. Eloy Inscoe says:

    Hello are using WordPress for your blog platform? I’m new to the blog world but I’m trying to get started and create my own. Do you need any coding expertise to make your own blog? Any help would be really appreciated!|

  9. Loren Blasl says:

    This piece of writing is actually a good one it helps new web users, who are wishing in favor of blogging.|

  10. Wow, this piece of writing is fastidious, my sister is analyzing such things, therefore I am going to tell her.|

  11. I’ve been exploring for a little bit for any high quality articles or weblog posts in this sort of space . Exploring in Yahoo I at last stumbled upon this website. Studying this information So i am happy to convey that I have an incredibly just right uncanny feeling I found out just what I needed. I such a lot unquestionably will make sure to don?t omit this website and provides it a look on a relentless basis.|

  12. Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You clearly know what youre talking about, why waste your intelligence on just posting videos to your weblog when you could be giving us something enlightening to read?|

  13. I do accept as true with all of the concepts you have presented to your post. They’re really convincing and will definitely work. Still, the posts are too quick for novices. Could you please prolong them a little from next time? Thank you for the post.|

  14. I like the valuable information you supply on your articles. I’ll bookmark your weblog and take a look at once more here frequently. I’m reasonably certain I will be told many new stuff right right here! Best of luck for the following!|

  15. A person necessarily lend a hand to make critically posts I might state. This is the first time I frequented your web page and so far? I surprised with the research you made to make this actual submit extraordinary. Fantastic activity!|

  16. My coder is trying to persuade me to move to .net from PHP. I have always disliked the idea because of the costs. But he’s tryiong none the less. I’ve been using Movable-type on numerous websites for about a year and am concerned about switching to another platform. I have heard fantastic things about blogengine.net. Is there a way I can import all my wordpress content into it? Any help would be greatly appreciated!|

  17. Thanks for finally writing about > blog_title < Loved it!|

  18. Dee Reckart says:

    You can definitely see your skills within the article you write. The arena hopes for even more passionate writers like you who are not afraid to mention how they believe. At all times go after your heart.|

  19. whoah this blog is great i love reading your articles. Stay up the great work! You already know, many individuals are searching round for this information, you can aid them greatly. |

  20. Nice post. I learn something new and challenging on blogs I stumbleupon everyday. It will always be interesting to read articles from other authors and use something from other sites. |

  21. Will Doland says:

    bookmarked!!, I love your site!|

  22. What’s Taking place i’m new to this, I stumbled upon this I’ve found It positively useful and it has helped me out loads. I’m hoping to contribute & assist other customers like its aided me. Good job.|

  23. Vera Voracek says:

    Everything is very open with a clear clarification of the challenges. It was definitely informative. Your website is very useful. Many thanks for sharing!|

  24. I am really grateful to the owner of this site who has shared this impressive article at here.|

  25. I have read some good stuff here. Definitely price bookmarking for revisiting. I wonder how a lot effort you put to make the sort of excellent informative website.|

  26. I used to be able to find good advice from your articles.|

  27. Hello, i believe that i saw you visited my blog thus i got here to go back the desire?.I am trying to find things to improve my site!I guess its good enough to use some of your concepts!!|

  28. Hey very cool blog!! Guy .. Beautiful .. Wonderful .. I will bookmark your site and take the feeds also? I’m glad to search out so many useful information right here in the submit, we want work out extra techniques on this regard, thank you for sharing. . . . . .|

  29. Hi! Someone in my Myspace group shared this site with us so I came to check it out. I’m definitely enjoying the information. I’m bookmarking and will be tweeting this to my followers! Outstanding blog and excellent design.|

  30. Prix Du Cialis 10mg En Pharmacie

  31. Propecia says:

    How To Last Longer Bed

  32. Lasix says:

    Amoxicillin Causes Leukopenia

  33. Viagra For Men For Home Delivery

  34. Hermine Putt says:

    Hi, i think that i saw you visited my website thus i came to “return the favor”.I’m attempting to find things to improve my site!I suppose its ok to use some of your ideas!!|

  35. Hazel Alfson says:

    Pretty! This was an extremely wonderful article. Many thanks for supplying these details.|

  36. Hi there, just became alert to your blog through Google, and found that it’s really informative. I am gonna watch out for brussels. I’ll be grateful if you continue this in future. Numerous people will be benefited from your writing. Cheers!|

  37. Remarkable! Its really amazing article, I have got much clear idea regarding from this post.|

  38. El Cialis Se Vende Con Receta

Leave a Reply

Your email address will not be published.

© 2021 javacposjavacpos.com ALL RIGHT RESERVED