浏览网页

时间:2019-07-15 23:52:58

标签: jquery

因此对于我的项目,我必须在jquery中实现一个按钮,单击该按钮将打开一个网站,并且必须导航到该网站上的特定标签。使用控制台,我可以看到单击特定选项卡时发生的事件。 我想做的是:

按钮(单击)->打开网站+导航至特定标签。

你好

我是jQuery和整体编码的初学者,所以请不要介意我尝试传达的任何内容是否有意义。 我尝试过使用window.location.herf,然后尝试使用另一个包含导航代码但似乎无法正常工作的功能。

感谢您的帮助。

让我们假设url为“ www.myurl.com”

导航代码:

$("#tabsport").click (function(event) {
 document.getElementById('createnewsport').method = "POST";
 document.getElementById('createnewsport').action = '/district/school/houses/createsport';
 document.getElementById('createnewsport').submit();

});

0 个答案:

没有答案
相关问题