For example, I need all the elements with the identifier "hide_" + value. This function should return "hide_1" and "hide_30", etc., Depending on the page elements.
See the dollar-dollar syntax:
$$('a[id^="hide_"]')
should be attached to you, whose identifiers begin with "hide_".
Most CSS3 is supported from Prototype 1.5.1 +.
One option is to assign a common class to these elements and get them using
var elements = $$('.class');
Pure DOM for general regex:
var all_tags = document.getElementsByTagName("*"); var results = []; for (var i = all_tags.length-1; i >= 0; -- i) if (regex.test(all_tags[i].id)) results.push(all_tags[i]); return results;
Source: https://habr.com/ru/post/1305566/More articles:Return significant exceptions from a WCF project - exception-handlingParsing RSS2 in PHP - xmlHow to reference .dll from a .jar file - javahttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1305564/i-have-a-hasmany-relationships-and-i-want-to-set-custom-limit-and-offset-as-well-as-to-count-them&usg=ALkJrhjgN3mzeFgqrdgtZosopBQjijcc-AHtaccess caching issue 'Header unset Last-Modified' - caching2 roles, administrator and user. Does it use anything other than basic HTTP overhill? - authenticationAutoform Ellipse Width Winform - c #How to handle self argument with Python decorators - pythonUsing Reflection.Emit to match an existing constructor - .netIs there a more efficient way to run enum values ββthrough a switch-case statement in C # than this? - performanceAll Articles