开发者

The click event is not working

开发者 https://www.devze.com 2023-04-07 19:27 出处:网络
Can someone point me in the right direction in figuring out why the event in the code below is not working. I tried using firefox but not sure how to troubleshooting this problem using firefox.

Can someone point me in the right direction in figuring out why the event in the code below is not working. I tried using firefox but not sure how to troubleshooting this problem using firefox.

Whe开发者_开发问答n I click on the button, nothing happens. I don't see the alert box

 <script type="text/javascript">
 $(document).ready(function()
 {
     $(#saveButton).click(function()
     {
         alert("hello World");
     });
 });
 </script>

 <div id="west" class="ui-layout-west">
    <input id="saveButton" type="button" value="save"></input>
    <div> <ul id="ul_west"></ul> </div>
 </div>


You forgot the quotes around the id.

$('#saveButton').click(function(){
     alert("hello World");
 });


$('#saveButton').click(function() // forgot '
     {
         alert("hello World");
     });
0

精彩评论

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