开发者

JQuery Uncaught Reference message

开发者 https://www.devze.com 2023-04-03 08:59 出处:网络
I have this function written: <script type="text/javascript"> function getStartDate(value) {

I have this function written:

<script type="text/javascript">
   function getStartDate(value) {
    $.post("gSearch.php", {dateSearch:value}, function(data){
        $('#results').html(data);
    )};
   }                            
</script>

and this piece of HTML:

<input id="startdate" name="startdate" type="text" onkeyup="getStartDate(this.value)">

but I get this in my console in Chrome; can any one help me as to why?

Uncaught ReferenceError: getStartDate is not defined (anonymous functio开发者_StackOverflow中文版n)gReport.php:172 onkeyup


<script type="text/javascript">
   function getStartDate(value) {
    $.post("gSearch.php", {dateSearch:value}, function(data){
        $('#results').html(data);
    });
   }                            
</script>

The brace was not closed properly, or was that a typo ?

0

精彩评论

暂无评论...
验证码 换一张
取 消