دنبال کننده ها

۱۳۹۶ مرداد ۹, دوشنبه

javascript - Jquery maximum stack exceeded

[ad_1]



I have a script written that when I type data in I get the error



jquery.min.js:4 Uncaught RangeError: Maximum call stack size exceeded



When I type in the input box it acts like it is trying to pull something, but the it times out with the above error. Any reason why it would do this?



 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript">
function loaddata()

var name=document.getElementById( "username" );

if(name)

$.ajax(
type: 'post',
url: 'loaddata.php',
data:
sku:name,
,
success: function (response)
// We get the element having id of display_info and put the response inside it
$( '#display_info' ).html(response);

);


else

$( '#display_info' ).html("Please Enter Some Words");



</script>
</head>
<body>

<form>
<input type="text" name="username" id="username" onchange="loaddata();"><div id="display_info"></div?
</form>
<br />
<div id="txtHint">Person info will be listed here.</div>
</body>
</html>



[ad_2]

لینک منبع