推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
johnkiller
V2EX  ›  Python

jQuery 求救, table 里面循环遍历产生的事件?

  •  
  •   johnkiller · Feb 28, 2018 · 1710 views
    This topic created in 3138 days ago, the information mentioned may be changed or developed.

    本人 17 岁,高二在读,初来乍到,菜鸟的水平,求轻喷。

    最近用 flask+mysql 弄了一个 web 选择题,js 是 jQuery。

    问题如下:

    在 table 里 每行 生成了一个 button -》 id 为 show_answer,事件为: 将本行 id 为 answer,带 hidden 属性的

    -》 显示出来。

    这是对单行的 jQuery 代码

    <script>
    $("#show_answer").click(function(){
        $("#answer").show();
      });
    </script>
    
    求一个,适用于每行的。。 我这问题问的可能像百度知道。。 但是我还是觉得这里比较靠谱,大牛比较多。
    johnkiller
        1
    johnkiller  
    OP
       Feb 28, 2018
    节点搞成 python 了,应该是 jQuery,见谅-
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2314 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 07:05 · PVG 15:05 · LAX 00:05 · JFK 03:05
    ♥ Do have faith in what you're doing.