How Do I Get Rid of JavaScript Void?

The JavaScript "void" function provides Web developers with an "onclick" event trigger that returns nothing to the browser. The "void" function is typically used as a placeholder for hyperlinks located in the HTML of the Web page. After you decide which hyperlink you want to use for navigation, you replace the JavaScript void function.

Instructions

    • 1

      Right-click the HTML file that contains the voided links. Click "Open With," then double-click your HTML editor in the list of programs.

    • 2

      Press the "Ctrl" and "F" keys to open the "Find" window. Type "void" in the "Find" text box and press "Enter." The editor scrolls directly to the location of the first void function.

    • 3

      Delete the void function and replace it with the hyperlink address. For instance, the following code shows you how to set up a proper hyperlink without the void function:

      <a href="mydomain.com/newpage.html">Click Here</a>

      The "void" function is located in the "href" property. The previous code sets up a link to the "newpage.html" page. Replace the domain and page with your own hyperlink address.

Related Searches:

References

Comments

Related Ads

Featured