how to make this link alert t0 times

<A HREF='javascript:window.alert("attack");'> link </A>

Recommended Answers

All 3 Replies

Can you clarify what your question is?

What do you mean by....

make this link alert t0 times

If you mean having the same alert box popup more than one time, then put the alert method within a loop such as...

<script type="text/javascript">
function alert10(msg){
var x = 1;
for (x = 1; x < 10; x++) 
{
alert("msg");
}
}
</script>

<a href='javascript:alert10("attack");'> link </a>

use a loop

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.