javascript - Questions about product deletion?
仅有的幸福
仅有的幸福 2017-06-12 09:30:16
0
3
811

The problem is: Use confirm to make conditional judgments. If you click to cancel the deletion and refresh the page, the product type that has just been deleted will be deleted (normally it will not be deleted if you cancel the deletion). What is going on? ?

仅有的幸福
仅有的幸福

reply all (3)
習慣沉默

Post the code and take a look. If you click confirm, it will return a value of true, and if you cancel, it will return false. Is your logic probably as follows?

if(confirm()){ //删除 } //隐藏弹框

    学习ing

    This question is very simple. You can specify the specified process after "confirm" or "cancel or close" for any confirm or third-party confirm. If there is a problem with the logic you wrote, please post the code

      世界只因有你

      The logic of cancellation and confirmation is reversed, right?

        Latest Downloads
        More>
        Web Effects
        Website Source Code
        Website Materials
        Front End Template
        About us Disclaimer Sitemap
        php.cn:Public welfare online PHP training,Help PHP learners grow quickly!