[英]How to auto click a html button in WebBrowser of Windows phone 8.0 application?
[英]How to Auto Click in HTML Button
<h1>Welcome to My Page!</h1>
<h2>My name is Bob.</h2>
<h3>I hope you like it here.</h3>
<embed src="MY WEBSITE LINK" style="width:500px; height: 300px;">
<input type="checkbox" id="btd" onmouseover="myFunction()" onclick="alert('clicked')">
<script>
jQuery(function(){
jQuery('#btd').click();
});
</script>
我有代碼。 但沒有工作。 http://www.imagebam.com/image/31ac1b820717083
如何從圖像自動單擊按鈕繼續?
我們不能在 HTML 中進行自動點擊,但是我們可以調用按鈕在 Jquery 中所做的任何函數。 要使用 Jquery 代碼,您需要將其添加到您的代碼中
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
實際上,當我們單擊任何按鈕時,它會調用一個函數,該函數可能是我們自己的函數,也可能是內置函數。 這里 Javascript 可以輕松調用任何函數,無需任何按鈕像這樣
//define the function function alertsomething(){ alert("Hey, This is an alert inside that function"); } //function works when button clicks $("#btd").click(function(){ alertsomething(); }) //function automatically when page loads $(document).ready(function(){ alertsomething(); })
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <button id="btd" >Click me</button>
這是調用函數的兩種方法。 一種是當您單擊按鈕時,另一種是當您的頁面加載時,該函數將自動調用...
謝謝
<script> setInterval(function(){ document.getElementById('btn').click() }, 10000); </script>
它的工作腳本從 FORM 'POST' 發送“數據”以刷新 HTML 頁面和 PHP 代碼
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.