Nonzerodivisor of a module under localization 
If $x_1,x_2,...,x_r\in R $ is an $M$-sequence (i.e. a regular sequence on $R$-module $M$), then $x_1^t,...,x_r^t$ is an $M$-sequence.

This is corollary 17.8 from Eisenbud's commutative algebra. The proof is doing induction on $r$. Thus, it suffices to show $x_r$ is a nonzerodivisor on $M/(x_1^t,...,x_{r-1}^t)M$. Then he says we may localize at a prime $P$ containing $x_1,x_2,...,x_r$, and reduce the case to that $R$ is a local ring.
I am confused here. If we do localization, we view $x_r\in R_P$ and then show it is a nonzerodivisor on $M_P/(x_1^t,...,x_{r-1}^t)M_P$. But it seems to me this doesn't imply $x_r\in R$ must be a nonzerodivisor on $M/(x_1^t,...,x_{r-1}^t)M$, because in general, if $x\in R_P$ is a nonzerodivisor on $M_P$ and $xm/s=0\in M_P$, we can only conclude that there exists some $s'\in R -P$ such that $s'm=0$. However, $m$ need not to be zero and not every element in $M$ can be written as the product of some $s$ and $m$. Did I misunderstand his argument?

The author wants to show that the multiplication by $x_r$ on $M/(x_1^t,...,x_{r-1}^t)M$ is injective and tests this locally.
