<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="UTF-8" />
<script type="text/javascript" src="js/jquery-1.8.0.js"></script>
<style>
* {
margin: 0px auto;
padding: 0px auto;
}
body{
width: 200px;
height: 80px;
border: 1px solid;
}
</style>
</head>
<body>
<div style="text-align: center;margin-top: 10px;">
<select id="select" style="width:150px;height:21px;" onchange="a()">
<option value="1">爬楼高手</option>
<option value="2">隔壁老尤条</option>
</select>
<input id="_input" style="width:130px;height:15px;margin-left:-157px;" type="text" />
</div>
<input type="button" onclick="b()" style="margin-top: 10px;margin-left: 100px;" value="显示值" />
</body>
<script>
function a() {
$("#_input").val($("#select option:selected").text());
}
function b(){
alert($("#_input").val());
}
</script> </html>

转载地址https://blog.csdn.net/qq_31083947/article/details/53575207

select 可输入的下拉框的更多相关文章

  1. js实现可输入的下拉框

    <HTML> <HEAD> <META http-equiv='Content-Type' content='text/html; charset=gb2312'> ...

  2. jquery模拟可输入的下拉框

    //页面html <div id="select" class="select" > <ul> <c:forEach items= ...

  3. Combo Select – jQuery可搜索下拉框插件

    今天用到另一款jq插件..插件就是无脑,,引入相关文件,开始撸吧 引入相关文件: <link href="~/Scripts/combo-select/combo.select.css ...

  4. Selenium_使用Select类对象处理下拉框(15)

    select标签的下拉框可以使用selenium的 Select模拟下拉框选择操作. Select需要导入才能使用,导入路径如下 from selenium.webdriver.support.ui ...

  5. ASP.NET MVC Select无限级分类选择下拉框

    1:读取父级下的所有子类别 *ViewBag.ParentItemList:不能与ParentId相同 private void ParentDropDownList() { List<SAS. ...

  6. selenium处理select标签的下拉框

    有时候我们会碰到<select></select>标签的下拉框.直接点击下拉框中的选项不一定可行.Selenium专门提供了Select类来处理下拉框. <select  ...

  7. python+selenium七:下拉框、选项框、select用法

    # from selenium import webdriverfrom selenium.webdriver.common.action_chains import ActionChainsimpo ...

  8. selenium - Select类 - 下拉框

    WebDriver提供了Select类来处理下拉框. 如百度搜索设置的下拉框,如下图: from selenium import webdriver from selenium.webdriver.s ...

  9. 下拉框处理(select)

    在UI自动化测试过程中,经常会遇到一些下拉框,我们有三种可选方式来操作下拉框. 第一种方法 基于webdriver的两次click,很容易出现问题,不建议使用.(由于部分下拉框在点击一次后,失去焦点再 ...

随机推荐

  1. ASP.NET MVC 学习笔记之TempData、HttpContext和HttpContextBase杂谈

    TempData本质上是Session 但是有一点不同的是,TempData被赋值之后,一旦被Action访问一次之后,马上就会清空. System.Web.HttpContext 和System.W ...

  2. springboot集成redis报错-ClassNotFoundException: org.apache.commons.pool2.impl.GenericObjectPoolConfig

    当使用Springboot 2.0以上版本集成redis的时候遇到报错信息如下: Application run failed org.springframework.beans.factory.Un ...

  3. Android开发 Butterknife使用方法总结

    前言: ButterKnife是一个专注于Android系统的View注入框架,以前总是要写很多findViewById来找到View对象,有了ButterKnife可以很轻松的省去这些步骤.是大神J ...

  4. Sphinx + Read the docs theme

    前言: 使用Sphinx 生成文档和使用 Read The Docs 的 readthedocs/sphinx_rtd_theme,假设是在Windows上运行并已安装好 python,可以执行pyt ...

  5. eclipse 彻底修改复制后的项目名称

    1.项目右键 --> properties --> Web Project Settings --> 修改Context root 2.web.xml 3.工作空间中找到当前项目下. ...

  6. Stream(Java 8)

    Java 8 中的 Stream 是对集合(Collection)对象功能的增强,它专注于对集合对象进行各种非常便利.高效的聚合操作(aggregate operation),或者大批量数据操作 (b ...

  7. open source library

    { https://gitee.com/tboox https://github.com/thejinchao/cyclone http://www.drchip.org/astronaut/ssl/ ...

  8. Magento笔记/记录(1)

    1.Magento eav_attribute表中source如何指定自定义数据来源  如果你引用的类名为yebihai_usermanage_model_entity_school你必须完整的给出地 ...

  9. Vue学习笔记【7】——Vue指令之v-model和双向数据绑定

    v-model是唯一可以实现双向数据绑定的vue指令 单向数据绑定:修改内存中的数据,页面上同步更改.v-bind <!-- v-bind 只能实现数据的单向绑定,从 M 自动绑定到 V, 无法 ...

  10. vue2 开发环境部署 及 打包配置

    一.脚手架工具(vue2 的脚手架工具是 vue-cli) 1.脚手架工具的安装 参考  :  https://blog.csdn.net/wulala_hei/article/details/804 ...