Just thought it was worth updating the thread with a more recent way of doing this in JavaScript as was still coming up in searches.
document.querySelector("[id^='statusMessage_']");
caniuse.com lists it can be used on IDs from IE8 and great support in other browsers.
More Related Contents:
- .prop() vs .attr()
- Check if an image is loaded (no errors) with jQuery
- Difference between “change” and “input” event for an `input` element
- Why are duplicate ID values not allowed in HTML?
- What is difference between width, innerWidth and outerWidth, height, innerHeight and outerHeight in jQuery
- jQuery DOM changes not appearing in view source
- Is there a DOM event that fires when an HTML select element is closed?
- How to detect when an iframe has already been loaded
- jQuery: how to change tag name?
- Ways to add javascript files dynamically in a page
- How can I remove all CSS classes using jQuery/JavaScript?
- Count immediate child div elements using jQuery
- Converting a recursive function into an asynchronous CPS implementation (javascript)
- jQuery/Javascript – How to wait for manipulated DOM to update before proceeding with function
- Convert String to XML Document in JavaScript
- How to set DOM element as first child?
- JQuery – animate moving DOM element to new parent?
- Open new window without focus on it [duplicate]
- How can I remove wrapper (parent element) without removing the child?
- window.getSelection return html [duplicate]
- How to properly unload/destroy a VIDEO element
- How to add a onclick event to an element using javascript
- Test if an element can contain text
- Load javascript async, then check DOM loaded before executing callback
- Best practice to avoid memory or performance issues related to binding a large number of DOM objects to a click event
- Why I cant use jQuery functionality
- How to check null objects in jQuery
- Screen Coordinates of a element, via Javascript
- How to avoid conflict between JQuery and Prototype
- Removing element with jQuery?