不推荐使用event.returnValue。请改用标准的event.preventDefault()。在vs2010 [英] event.returnValue is deprecated. Please use the standard event.preventDefault() instead. in vs2010
问题描述
嗨大家好
我正在尝试使用jQuery .load()加载一个aspx页面。
我有两个页面,即Home.aspx和About.aspx。两者都有一个共同的site.master页面。在母版页中,我添加了对jquery 1.10.x cdn的引用。在我的脚本中(在Home.aspx中)我正在使用此代码
Hi Guys
I am trying to load an aspx page by using jQuery .load().
I have two pages namely Home.aspx and About.aspx. Both have a common site.master page. In the master page, i am adding the reference to the jquery 1.10.x cdn. In my script (in Home.aspx) I am using this code
<script type="text/javascript">
$(document).ready(function () {
$.ajaxSetup({ cache: false });
$(".click").click(function () { //click is the class name of a button in home.aspx
// //alert("Hi");
$("html").load("About.aspx");
});
});
</script>
about.aspx没有加载,在调试时发现此错误'event.returnValue已弃用。请使用标准的event.preventDefault()代替。'任何人都可以提供帮助。在此先感谢。
The about.aspx did not load and while debugging i found this error 'event.returnValue is deprecated. Please use the standard event.preventDefault() instead.' Can anybody help. Thanks in advance.
推荐答案
( document )。ready( function (){
(document).ready(function () {
.ajaxSetup({cache: false });
.ajaxSetup({ cache: false });
( 。点击)。点击( function (){ // click是home.aspx中按钮的类名
// // alert(Hi);
(".click").click(function () { //click is the class name of a button in home.aspx // //alert("Hi");
这篇关于不推荐使用event.returnValue。请改用标准的event.preventDefault()。在vs2010的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!