<button id="modal" >click</button>
hnde po kase ako mahanap ng code na mago-autoclick sa button na dineclare ko... thank you po sana matulongan nio ako mga master..
buong code:
<head>
<title>test dailymotion</title>
<script src="https://api.dmcdn.net/all.js"></script>
</head>
<body>
<input type="button" id="myCheck" onLoad="myFunction()" simulateClick="myFunction()">
<div id="player-dailymotion"></div>
<button id="pause">Pause</button>
<script>
function myFunction() {
document.getElementById("myCheck").click();
}
</script>
<head>
<script type = "text/javascript">
</body>
<script>
function myFunction()
{
document.getElementById('linkid').click();
}
</script>
<script type="text/javascript">
//Give time to load dailymotion script
setTimeout(function() {
DM.init({
apiKey: '',
status: false, // check login status
cookie: true // enable cookies to allow the server to access the session
});
var player = DM.player(
document.querySelector('#player-dailymotion'),
{
video: 'x1safo9',
width: '400px',
height: '200px',
params: {
chromeless: 1
}
}
);
document.querySelector('#myCheck').addEventListener('click', function() {
console.log('click on play');
player.watchOnSite();
});
document.querySelector('#pause').addEventListener('click', function() {
console.log('click on pause');
player.pause();
});
}, 1000);
</script>
</html>
comments:
-------------------------
...Jquery
$("#modal").click();
Standard JS
document.getElementById("modal").click();
....kapag auto click na sinasabi mo.. eto pwd
var interval = setInterval(yourFunctionButton, 1000);
....pag 1 time click lang immediately invoke function mo nlang...ung second argument interval time milisec
.. ganito po ate ikaw nlang bhala mag ayos pero ganito ung sinabe mo
(function(){
alert('tae')
}());
...di ko kc makita ung js code ng modal mo e.. pero kung meron kna code dun dagdagan mo lang ng ganito sa dulo () function para mag auto run once na ma read sya ng browser
...ang logic lang nmn eh maregister sa database m ung IP address na vivisit sa site mo
....anu po kaya kulang jan mga sir? 1 week na ako nagta-try pati ung mga code halos lahat ng binigay sa ibang forum ayaw talaga gumana
No comments:
Post a Comment