1
私のウェブページでは、jqueryを使ってナビゲーションメニューをクリックしてコンテンツ(gmailなど)を変更しました。一例であるここでは、ここでjqueryイベントで表示されるコンテンツを、ユーザーが更新すると維持できますか?
<p>
I have a classifieds website, and on the page where ads are showed,
I am creating a "Send a tip to a friend" form... So anybody who wants can send a tip of the ad to some friends email-adress.
I am guessing the form must be submitted to a php page right? When submitting the form, the page gets reloaded... I don't want that... Is there any way to make it not reload and still send the mail? Preferrably without ajax or jquery... Thanks
</p>
<button id="chg">
Change content
</button>
は、私が何をしたい主なポイントは、今p
要素内のテキストがに変更され、私はchange content
ボタンをクリックした後、ある、私はjQueryを使ってみましたものです
$(document).ready(function(){
var isnew = "";
console.log(isnew);
if(isnew == true) {
console.log("check "+isnew);
$("p").html("New contents are here........");
}
$("#chg").click(function(){
isnew = true;
console.log(isnew);
$("p").html("New contents are here........");
});
});
New contents are here.....
。
この時点で、ユーザーがページをリロードすると、New contents are here.....
のような変更されたコンテンツのみが表示されます。 html
で書かれたテキスト(パラグラ)ではありません。
私はできるだけ多く試しました。しかし、私は問題を解決することはできません。だから、何か提案があれば大変感謝しています。
あなたは[のsessionStorage](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage) – anu
@anuを試すことができます答えにあなたのコメントをお願いしますか? – Cloud