User selection in Javascript?
Ad
User selection in Javascript?
So I have a folder, and in the folder I have 2 other folder one is about.html and the other is main.html........ So my question is if I m on my main html page and have my about in <ul><li>about<li><ul>
And I want if I click on the about, I want it to go to the about.main html...... So basically I want to know how can I can about.html to my main.html so went I click it, it take me straight to my about page...... Hope somebody can help I m new to JavaScript so take it easy on meπ
Ad
Answer
Ad
If I understand what you are saying why not just use an a tag eg.
<a target="_blank" rel="nofollow noreferrer" target="_blank" rel="nofollow noreferrer" href="folder1/about.html">About</a>
<a target="_blank" rel="nofollow noreferrer" target="_blank" rel="nofollow noreferrer" href="folder2/main.html">Main</a>
You can do this in javascript like this
var link = document.createElement('a');
link.target="_blank" rel="nofollow noreferrer" target="_blank" rel="nofollow noreferrer" href="folder1/about.html";
link.click();
Ad
source: stackoverflow.com
Related Questions
Ad
- β How to update data attribute on Ajax complete
- β October CMS - Radio Button Ajax Click Twice in a Row Causes Content to disappear
- β Octobercms Component Unique id (Twig & Javascript)
- β Passing a JS var from AJAX response to Twig
- β Laravel {!! Form::open() !!} doesn't work within AngularJS
- β DropzoneJS & Laravel - Output form validation errors
- β Import statement and Babel
- β Uncaught TypeError: Cannot read property '__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED' of undefined
- β React-router: Passing props to children
- β ListView.DataSource looping data for React Native
- β Can't test submit handler in React component
- β React + Flux - How to avoid global variable
- β Webpack, React & Babel, not rendering DOM
Ad