How to find and replace "style=" and width="...." values in HTML code (NOT CSS stylesheet)?

How to find and replace "style=" and width="...." values in HTML code (NOT CSS stylesheet)?

Assume I have a code like

  1. <div ..... style=".... width: 780px;">...</div>
  2. <rect ...... width="780px" ....">...</rect>

So the width values are NOT retrieved from separate CSS stylesheet (file) but are part of a HTML code.

How can I identify these elements by jQuery and change/overwrite the values to e.g. a width of lets say 400px?