<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/redirect-to-a-link-when-user-selects-option-in-a-select-ioch7pvnk" -->

---
title: Redirect to a link when user selects option in a select
description: Learn how to redirect to a link when a user selects an option in a select element using HTML and plain JS or Alpine.
canonical: https://daily.dev/posts/redirect-to-a-link-when-user-selects-option-in-a-select-ioch7pvnk
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Redirect to a link when user selects option in a select | daily.dev
og:description: Learn how to redirect to a link when a user selects an option in a select element using HTML and plain JS or Alpine.
og:url: https://daily.dev/posts/redirect-to-a-link-when-user-selects-option-in-a-select-ioch7pvnk
og:image: https://api.daily.dev/og/posts/IOcH7pVnK.png
og:image:alt: Redirect to a link when user selects option in a select
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Redirect to a link when user selects option in a select

**[Flavio Copes](https://daily.dev/sources/flaviocopes)** · 2 min read · 5 upvotes · 0 comments

## Summary

Learn how to redirect to a link when a user selects an option in a select element using HTML and plain JS or Alpine.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://flaviocopes.com/redirect-to-a-link-when-user-selects-option-in-a-select>

---

Tags: [#webdev](https://daily.dev/tags/webdev), [#javascript](https://daily.dev/tags/javascript), [#html](https://daily.dev/tags/html), [#alpinejs](https://daily.dev/tags/alpinejs)

[View this post on daily.dev](https://daily.dev/posts/redirect-to-a-link-when-user-selects-option-in-a-select-ioch7pvnk)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Redirect to a link when user selects option in a select","url":"https://daily.dev/posts/redirect-to-a-link-when-user-selects-option-in-a-select-ioch7pvnk","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/redirect-to-a-link-when-user-selects-option-in-a-select-ioch7pvnk"},"datePublished":"2023-12-22T08:43:15.638Z","dateModified":"2023-12-22T08:43:14.647Z","description":"Learn how to redirect to a link when a user selects an option in a select element using HTML and plain JS or Alpine.","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7c87a122721eba666b7933247636e7c7?_a=AQAEufR","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/7c87a122721eba666b7933247636e7c7?_a=AQAEufR","isAccessibleForFree":true,"articleSection":"Flavio Copes","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Flavio Copes","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/1f2dbd275797411bbd37bfdaaf0951a9","url":"https://daily.dev/sources/flaviocopes"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/redirect-to-a-link-when-user-selects-option-in-a-select-ioch7pvnk","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":5},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"webdev,javascript,html,alpinejs","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Flavio Copes","item":"https://daily.dev/sources/flaviocopes"},{"@type":"ListItem","position":3,"name":"Redirect to a link when user selects option in a select"}]}
```

