【问题标题】:dynamic triggering of "javascript:__doPostBack()"“javascript:__doPostBack()”的动态触发
【发布时间】:2014-04-12 10:37:20
【问题描述】:

我有一个用asp编写的网页,并且有一个特定项目的删除功能。

删除按钮正在使用“javascript:__doPostBack()”。我需要实现某种自动化来为每个项目触发此按钮.. 在 perl 中执行此操作的正确方法是什么?

谢谢

【问题讨论】:

    标签: javascript asp.net perl postback


    【解决方案1】:

    我之前通过使用以下代码在此过程中取得了成功:

    // You'll have to change this, of course.
    var deleteButton = document.getElementByid("whatever");
    
    // Now that I have the button:
    // Call the function, make sure it gets the right `this`.
    __doPostBack.call(deleteButton);
    

    【讨论】:

    • 不幸的是链接没有id,链接实现为:'德尔--'
    • 听起来你应该看看 xpaths。我在用手机,或者我会发布一个链接。
    猜你喜欢
    • 2011-12-26
    • 1970-01-01
    • 1970-01-01
    • 2013-05-16
    • 2014-07-20
    • 1970-01-01
    • 1970-01-01
    • 2013-02-27
    • 2011-09-15
    相关资源
    最近更新 更多