English 中文(简体)
仅使用jscript或ajax
原标题:Reset only 1 DIV using jscript or ajax

我试图在卸载其余部分时重载四级驱动器,但我发现,许多网站的正文太低,但我发现其中的每一种改动都不起作用,如果我把纸面放在斜线上,它就无所作为。

$(function() {
  $("#refresh").click(function(evt) {
     $("#scratcher-box").load("index.php")
  })
})

<a href="#" id="refresh">click</a>

Tried disabling as many of the other mini scripts I have running, toggle div, delay load and a count. Have JQuery 1.7.2 loader as well as http://dl.dropbox.com/u/31213713/scratcher.js, with a few changes which broke the included reset button. My jscrips is lousy so looking for a backup plan in case we cannot fix up the reset, here is the original http://dl.dropbox.com/u/31213713/scratcher_orig.js

最佳回答

www.un.org/Depts/DGACM/index_french.htm 在这项职能中,如果找回错误的话,你就把点击(在此案件中起诉神父)。

Second: you are trying to load index.php into an element with the id scratcher-box, which seems non-existent? You either forgot to create such an element or you did not post your complete code. Try the following:

<a href="#" id="refresh">click</a>
<div id="scratcher-box" />

<script type="text/javascript">
  $(function() {
    $("#refresh").click(function(evt) {
      $("#scratcher-box").load("index.php")
      return false;
    })
  })
</script>

After review of the problem: I ve checked using your files on dropbox, the problem does not reside on the click event or within that event s call, the problem is within the changes in the scratcher.js file.

You ve changed the number of Scratcher objects within the javascript calls from 3 to 20. However, as soon as the scripts tries to get Scratcher4 s width it throws an error on line 192 as there is no canvas element with ID Scratcher4.

这一错误被推倒在文件上,导致除等待你确定这一错误和增加这些血管元素外,无法做任何事情。

Besides adding the scratchers into the javascript objects, also create the canvas items within HTML. This fixes your error and this enables javascript to execute the .click call.

问题回答

或许,你应当防止违约联系行动:

$(function() {
  $("#refresh").click(function(evt) {
     evt.preventDefault();
     $("#scratcher-box").load("index.php")
  })
})

然后确保有<代码>#scratcher- Box 页 次

you can use below code : By adding preventDefault you can prevent the default action of anchor tag

$(function() {
  $("#refresh").on( click , function(e) {
     e.preventDefault();
     $("#scratcher-box").load("index.php");
  });
});




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签