翻译一篇文章'上.单击'PHP中的事件,来自'window.open'到基本URL链接
Translating an an 'on.click' event in PHP, from 'window.open' to a basic URL link
我正试图对Joomla组件进行破解,以更好地满足我的需求。当前代码如下:
$eventprnt = 'onclick="window.open(''index.php?option=com_coupon&view=coupons&task=print_coupon&id='.$item->id.''')" ';
$eventcart = ' onclick="add_to_cart('.$item->id.');"';
$live_prt = 'coupon_print';$live_crt = 'coupon_cart';
if($item->coupon_type == 4){
$dealevent = 'onclick="prompt_link('.$item->id.','.$final_price.',this)"';
}
$eventprnt
函数当前打开一个浏览器窗口。我想将其转换为标准URL链接,同时保留onclick
事件(即:不使用<a>
或使用JScript <button>
交换到echo
(有多个调用,已附加到此触发器)。
我什么都试过了,语法让我很头疼。-我试过window.location
而不是window.open
,但没有用。
定位是可行的:
$eventprnt = 'onclick="location.href=''index.php?option=com_coupon&view=coupons&task=print_coupon&id='.$item->id.''';" ';
相关文章:
- 有可能过滤来自嵌入式YouTube的声音吗
- 正在寻找比$(document).ready慢的$(window).load的替代方案
- 直接下载文件,而不是从window.open(url)
- $window.ga在AngularJS事件中未定义
- 如何在创建键时引用来自同一对象的键
- 如何将PDF作为二进制文件传递到window.open()
- 来自文本输入null的html javascript变量
- window.onload没有'无法在Android WebView中工作
- window.location替换并传递URL历史记录条目中的变量
- TypeError:_this.store.getState在使用来自Redux的连接时不是函数
- 选项卡侦听器未被来自后台脚本的消息激活
- window.on.scroll事件未启动
- 翻译一篇文章'上.单击'PHP中的事件,来自'window.open'到基本URL链接
- 使用来自 iframe 的相对 url 跨域导航 parent.window
- ng-repeat在UI-gmaps-window内不渲染来自$http调用的数据
- 是否可以等待来自window.external.Foo()调用的应答
- 为什么window.load不是'当请求来自页面外部时,它不起作用,但在其他情况下它起作用
- window.close()无法处理来自Web浏览器控件的弹出窗口
- 如果window.historylocation来自www.example.com,请采取措施
- 在objective C中拦截来自javascript的window.external.notify调用