欢迎您 本站地址:
复制网址
手机查看
切换背景
返回首页
返回编程教学
在线html编辑器
其他副业
其他副业
国际电话区号大全
Linux常用命令
精选
元朝历史
学习Rust
源代码:
html编辑器
颜色值转换
点击运行
小库网 <script src="https://cdn.staticfile.net/jquery/1.10.2/jquery.min.js"> </script> <script> $(document).ready(function(){ $("input[name~='nation']").css("background-color","yellow");}); </script> <input name ="nationality" type="text" value="Chinese"> <input name="nation" type="text" value="English"> <input name="country" type="text" value="Germany"> <input name="anothernation" type="text" value="Norwegian"> <p>选取所有 name 属性包含 'nation' 单词的 input 元素。</p> <p><b>注意</b>: 选取的是'nation' 单词,而不是以 "nation" 开头或结束的单词(例如 "nationality" 和 "anothernation")。
运行结果:
小库提示
扫描下方二维码,访问手机版。
打赏
关闭