Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
_ _ をプレースホルダーとしてマスクを使用しています。しかし、私はこれをする必要があり$.trimます。誰かが方法を知っていますか?
$.trim
ありがとうございました!
jquery は必要ありません。単純な正規表現の置き換え:
alert("__some string & stuff _".replace(/^_+|_+$/g,""));