action = $('[src $= mail\\.js]').attr('src').replace('js','php'); $('[src $= mail\\.js]').attr('src', action)