How to Remove Minus & Plus Characters in Javascript

Gauloran

Kıdemli Moderatör
7 Tem 2013
8,096
585
local

1

Open the HTML file you want to add Javascript to in your text editor.
2

Create the Javascript tags by typing the following in the text editor: <script type=”text/JavaScript”> </script>. The tags tell the Web browser to execute the code between the tags as Javascript. The remaining code will be written between the tags.

3

Remove the plus signs using the replace() function by writing the following code:

myString = myString.replace(/\+/g, “”);

Change “myString” to the name of the string you want to remove plus signs from.
4

Remove the minus signs by typing the following code:

myString = myString.replace(/\-/g, “”);

Substitute “myString” with the name of the string you want to remove minus signs from.
5

Save the file, then load it into a Web browser by typing the address of the file in the address bar.
 
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.