search

Home  >  Q&A  >  body text

javascript - How to link the HTML anchor link in JS to the page after the click function is executed? I am a novice, please give me some advice!

I am new to JavaScript and not very familiar with js. Thanks for the advice!
Figure 1 is the front-end code where the anchor link will jump to the corresponding page

Figure 2 is the front-end code of the page corresponding to the anchor link jump

Emergency question: Because

in Figure 2
 name="already_attention_signal"

Need

 onclick="showwithtab(2,this)"

The displayed page can only be executed. So I don’t know how to add or modify Figure 1. Wait online! Urgent! I will reply in time!

迷茫迷茫2770 days ago777

reply all(3)I'll reply

  • PHPz

    PHPz2017-05-19 10:36:55

    javascript:alert(1);
    
    你把这个放在href里面。你是要这种吗?

    reply
    0
  • 迷茫

    迷茫2017-05-19 10:36:55

    Can’t understand. . . Don’t know what to say

    reply
    0
  • phpcn_u1582

    phpcn_u15822017-05-19 10:36:55

    The problem description is not very clear.

    Standard anchor point, use href="#id", of course you can also use the DOM native document.getElementById("targetID").onfocus() to get the same effect. Since you have used jQuery, just use $ ("#targetID").focus() to get focus

    reply
    0
  • Cancelreply