“panggilan fungsi javascript on” Kode Jawaban

panggilan fungsi javascript on

window.onload = function() {
  yourFunction(param1, param2);
};
//DOMContentLoaded It means when the DOM Objects of the document are fully loaded and seen by JavaScript, also this could have been "click", "focus"...
//function() Anonymous function, will be invoked when the event occurs.
// not work with IE8
document.addEventListener("DOMContentLoaded", function() {
  you_function(...);
});
code fighter

Panggil fungsi saat halaman dimuat

<script src="js/jquery-1.11.0.min.js" type="text/javascript"></script>
<script type="text/javascript">

    $(document).ready(function () {
        yourFunction();
    });
    function yourFunction(){
      //some code
    }
</script>
Vishal090

Jawaban yang mirip dengan “panggilan fungsi javascript on”

Pertanyaan yang mirip dengan “panggilan fungsi javascript on”

Lebih banyak jawaban terkait untuk “panggilan fungsi javascript on” di JavaScript

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya