複数種類の検索ができる検索ボタンを作りたいと考えています。
例えば、2種類の検索ボックスを作る場合、
下記のように検索をボックスを2つ作らなければなりません。
1つは、google検索ができる検索ボックス
もう1つはyahooの検索ができる検索ボックス
デザイン的にダサいのでカッコイイ検索ボックスを作りたいです。
<form method="get" action="https://www.google.co.jp/search"> <input type="text" name="q"> <input type="submit" value="search"> </form> <form method="get" action="https://www.yahoo.com/search"> <input type="text" name="q"> <input type="subm![イメージ説明](49a0de2722c86935149bee6673d6b8e0.png)lue="search"> </form>
カテゴリーのsubjectAを選択した時にgoogle検索、
カテゴリーのsubjectAを選択した時にyahoo検索ができるようにするにはどうすればいいでしょうか?
![イ(d4a0101118a859ede25b544931376c81.png)
写真のサンプルコードコードは以下です。
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="author" content="colorlib.com"> <link href="https://fonts.googleapis.com/css?family=Poppins" rel="stylesheet" /> <link href="css/main.css" rel="stylesheet" /> </head> <body> <div class="s131"> <form> <div class="inner-form"> <div class="input-field first-wrap"> <input id="search" type="text" placeholder="What are you looking for?" /> </div> <div class="input-field second-wrap"> <div class="input-select"> <select data-trigger="" name="choices-single-defaul"> <option placeholder="">CATEGORY</option> <option>Subject A</option> <option>Subject B</option> <option>Subject C</option> </select> </div> </div> <div class="input-field third-wrap"> <button class="btn-search" type="button">SEARCH</button> </div> </div> </form> </div> <script src="js/extention/choices.js"></script> <script> const choices = new Choices('[data-trigger]', { searchEnabled: false }); </script> </body><!-- This templates was made by Colorlib (https://colorlib.com) --> </html>
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。