How check for ID existence using jQuery?

后端 未结 4 1468
南笙
南笙 2021-01-17 07:24

I want to have a line of code similar to below:

var name = $(\'#input-name\').attr(\"value\");

However, the id \'input-name\' is not guaran

4条回答
提交回复
热议问题