title: How to update/append a string with javascript?
body: <p>I want to check whether in <code>querystring</code> there is something like <code>[?|&amp;]rid=\d</code>, </p>
  
  <p>if there is,I want to update the <code>\d</code> with a specific <code>rid_value</code>,</p>
  
  <p>else I want to append <code>&amp;rid=rid_value</code> to <code>querystring</code></p>