js implements select jump function code_javascript skills
JS simply implements the select jump function: the code is as follows
<!DOCTYPE html> <html> <head> <title></title> </head> <body> <div class="selectBox"> <select class="toSlt"> <option href="http://jichuang.gongchang.cn/pro-161264/">全部分类的商品</option> <option href="http://jichuang.gongchang.cn/">普通车床</option> <option href="http://jichuang.gongchang.cn/brand/">回转车床</option> <option href="http://jichuang.gongchang.cn/">普通车床</option> <option href="http://jichuang.gongchang.cn/brand/">回转车床</option> </select> </div> <script type="text/javascript" src="../js/jquery-1.11.1.min.js"></script> <script type="text/javascript"> $(function(){ var $body = $('body'); $body.on('change', 'select:has(option[href])', function(e) { var _this = $(this), _href = _this.find('option:selected').attr('href');//获取要跳转的地址 location.href = _href; //跳转 }) }) </script> </body> </html>

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



How to implement page jump after PHP form submission [Introduction] In web development, form submission is a common functional requirement. After the user fills out the form and clicks the submit button, the form data usually needs to be sent to the server for processing, and the user is redirected to another page after processing. This article will introduce how to use PHP to implement page jump after form submission. [Step 1: HTML Form] First, we need to write a page containing a form in an HTML page so that users can fill in the data that needs to be submitted.

PHP login jump value transfer method: 1. POST value transfer, use the HTML "form" form jump method to post value transfer; 2. GET transfer value, use the <a> tag to jump to xxx.php , obtain the passed value through "$_GET['id']"; 3. SESSION passes the value. Once saved in SESSION, other pages can be obtained through SESSION.

Title: Implementation method of page jump in 3 seconds: PHP Programming Guide In web development, page jump is a common operation. Generally, we use meta tags in HTML or JavaScript methods to jump to pages. However, in some specific cases, we need to perform page jumps on the server side. This article will introduce how to use PHP programming to implement a function that automatically jumps to a specified page within 3 seconds, and will also give specific code examples. The basic principle of page jump using PHP. PHP is a kind of

When writing a website or application, you often encounter the need to jump to a specific page. In PHP, we can achieve page jump through several methods. Below I will demonstrate three common jump methods for you, including using the header() function, using JavaScript code, and using meta tags. Using the header() function The header() function is a function used in PHP to send original HTTP header information. This function can be used in combination when implementing page jumps. Below is a

Asynchronous processing method of SelectChannelsGo concurrent programming using golang Introduction: Concurrent programming is an important area in modern software development, which can effectively improve the performance and responsiveness of applications. In the Go language, concurrent programming can be implemented simply and efficiently using Channels and Select statements. This article will introduce how to use golang for asynchronous processing methods of SelectChannelsGo concurrent programming, and provide specific

How to hide the select element in jquery: 1. hide() method, introduce the jQuery library into the HTML page, you can use different selectors to hide the select element, the ID selector replaces the selectId with the ID of the select element you actually use; 2. css() method, use the ID selector to select the select element that needs to be hidden, use the css() method to set the display attribute to none, and replace selectId with the ID of the select element.

Jump statements include: 1. break statement, which is used to exit a loop or a switch statement to allow the program to continue executing the code after the loop. The syntax is "break;"; 2. continue statement is used to exit this loop and start the next one. Loop, syntax "continue;"; 3. Combined with labels to jump to the specified label statement, syntax "label + :"; 4. goto statement, used to unconditionally transfer to the specified line in the program, syntax "goto label; ... ...Tag: expression;".

Title: PHP Programming Tips: How to Jump to a Web Page within 3 Seconds In web development, we often encounter situations where we need to automatically jump to another page within a certain period of time. This article will introduce how to use PHP to implement programming techniques to jump to a page within 3 seconds, and provide specific code examples. First of all, the basic principle of page jump is realized through the Location field in the HTTP response header. By setting this field, the browser can automatically jump to the specified page. Below is a simple example demonstrating how to use P
