Tell <a href=""> how to make links like <a href=""> open in the same window and not in another?

PS: how can you make it minimalist so that when you click on each link of the form <a href="адрес" in the same container, the Ajax loads the URL of the link, the file from the address? Thanks in advance!

  • 2
    What do you need something? =) - Salivan

2 answers 2

Use the target attribute. Description .

In your case, use either _self or _parent .

 <p><a href="new.html" target="_blank">Открыть в новом окне</a></p> <p><a href="new.html" target="_self">Открыть в этом окне</a></p> 
  • Well, here it is! )) @Asen, but you could not understand what the author of the question wanted;) Down with ajax! Give target = "_ self"! - Deonis

I think the author had in mind a frame type system. That is, there is a block 100х100 and links, when clicked, information would be loaded into this block without reloading the page.

I would advise Ajax tabs in this case. Here is a demo .