I have ul li with the same idname
li id=”name1″
li id=”name2″
etc
i can add and remove li but the numbering not always good. How could i get the maximum name id?
Many thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If they are guaranteed to appear sequentially in your document, you could do:
or if you just need the number:
where
[id^=name]means that the id attribute starts with ‘name’.