当前位置:网站首页>js失去焦点获取值
js失去焦点获取值
2022-07-20 08:14:00 【u011042325】
html
<input type="text" value="10" id="pro-qua" d-s="s" onblur="inputonblur(this)">
js
<script>
/**
* 手动设置数量
* @param _this
*/
function inputonblur(_this) {
//这里看当前那个适用就适用哪个
console.log(_this)
var num = _this.valueOf();
console.log(num)
var num = _this.value;
console.log(num)
var num = _this.val;
console.log(num)
}
</script>
边栏推荐
- 使用uniCloud云函数在小程序中解码微信运动步数
- ASP. Net core using redis
- Flink 的学习笔记
- 使用R从Excel中删除带有空单元格的行
- Comparative evaluation of reverse analysis tool IDA and open source tools ghidra and cutter
- 逆向分析工具IDA与开源工具Ghidra、Cutter对比测评
- Openresty accesses redis and MySQL
- Make your ggplot2 support markdown syntax
- Two ways of QT multithreading implementation thread implementation
- sql server 2022 安装
猜你喜欢
随机推荐
Duplicate class com.amap.api.fence.DistrictItem found in modules jetified-3dmap-9.3.1.jar (com.amap.
ASP. Net core using Autofac
localtime()
UML图系列之序列图
Spack作业分析
[Verilog digital system design (Xia Yuwen) -- basic knowledge of Verilog 2]
Nuscenes数据集总结
Go runtime package
Google Play 商品详情,考试内容
Spark高效数据分析04、RRD创建
Webdynpro development-03 create a Webdynpro material code query page
R 语言计算定积分
ASP.NET Core 使用Autofac
位置不可用——文件或目录损坏且无法读取
Flume的学习笔记
File upload and download
sql递归随记
Iptables firewall experiment
R package simputation for interpolating missing values in R language
Leetcode force deduction solution - 30 Concatenate substrings of all words