我有一個表單,我想要做一件事:當我點擊de按鈕併發布表單時,我想滾動到特定的點。我試着用餅乾和我的代碼是這樣的: `如何滾動發佈表單
<!-- I have a library called cookie and the cookie works well, but when I send, the page go up and I want to stay in the scroll position -->
<form method="post" action="">
<input type="submit" value="send" name="btn" /></div>
</form>
<script>
function send() {
cookie.asignar("altura", $(window).scrollTop(), "../js/", 10);
$(window).scrollTop(0, cookie.agafar("altura"));
cookie.suprimir("altura");
}
</script>
<?php
if (isset($_POST['btn'])) {
echo '<script>send();</script>';
}
?>
使用jQuery和PHP。
我沒有時間看到下面 –
感謝所有的肛門,他們都工作 –