【问题标题】:Need Help button href in php echophp echo中的需要帮助按钮href
【发布时间】:2019-05-09 17:34:39
【问题描述】:

我有以下代码行:

//onclick="location.href='http://www.example.com'"
echo "<button type='button' class='single_add_to_cart_button button alt wdm_enquiry' style='background:rgb(0, 171, 0) none repeat scroll 0% 0%';>Ihre ".$post_name." Testversion anfordern!</button>";

onclick 需要包含在 echo 中,但我不能这样做。

谁能帮帮我?

【问题讨论】:

标签: php button onclick href


【解决方案1】:

你可以这样写:

echo "<button type='button' onclick=\"location.href='http://www.example.com'\" class='single_add_to_cart_button button alt wdm_enquiry' style='background:rgb(0, 171, 0) none repeat scroll 0% 0%';>Ihre $post_name Testversion anfordern!</button>";

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-11-12
    • 1970-01-01
    • 1970-01-01
    • 2013-02-24
    • 2011-09-02
    • 1970-01-01
    • 2010-11-27
    • 2011-08-24
    相关资源
    最近更新 更多