Get value of dropdownlist or html select using Jquery

In Jquery, you need to write one line code to get value of dropdownlist.
You can use following code to get value of selected option

Var selectvalue=$('#urid').val();

You can use following code to get text of selected option

Var selecttext=$('#urid').text();

you are done......
 
Happy coding...........

Comments

Popular posts from this blog

Use Chroma DB vector database in RAG application using llama index & Deepseek R1 local model

I have created an application to extract text from image using AI

Download DeepSeek R1 Model Locally free | AI RAG with LlamaIndex, Local Embedding and Ollama

Understanding the Singleton Design Pattern in C#

Create Chat bot application using Python, Streamlit and Gemini AI