首页
归档
笔记
树洞
搜索
友言

文章详情

Interesting People Record Interesting.

/ JavaScript / 文章详情

相当于jQuery中$('input [name$=“value”]')的Javascript如何写?

Sonder
2020-05-08
340字
1分钟
浏览 (2.4k)

How can I get an input element whose name attribute ends with a particular value using just javascript?

I found this $('input[name$="value"]') method available in jQuery.

Is there a function like that available in javascript? I cannot use jQuery for some reason.

Answers:

复制代码
var elements = document.querySelectorAll('input[name$="value"]');
下一篇 / FORM表单AJAX提交方法

🎯 相关文章

💡 推荐文章

🕵️‍♂️ 评论 (0)