検索窓を表示させて、値を代入する
var rawAddress = "";
if( rawAddress == ""){
var proaddress = window.prompt('アドレスを入力してください','');
if(proaddress === '' || proaddress === null){
alert("サンプルアカウントを表示します");
proaddress = "SAMPLE";
}
rawAddress = proaddress.replace( /-/g , "" ).toUpperCase();
if(history.replaceState) {
history.replaceState(null,null,"?address=" + rawAddress);
}
gオプション
var name = "This is A , A is B . ";
name.replace(/A/g, "C");
=> "This is C , C is B ."