在jquery中替换函数名 [英] replace function name in jquery

查看:81
本文介绍了在jquery中替换函数名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<span type="option" text="E-mail a Link" onmenuclick="javascript:navigateMailToLinkNew('http://sp2007site/Documents/090505-test.pdf')"

iconsrc = QUOT; / _布局/图像/ gmailnew.gif" iconalttext = QUOT;" id =" ID_SendToEmail">< / span>

iconsrc="/_layouts/images/gmailnew.gif" iconalttext="" id="ID_SendToEmail"></span>

你可以告诉我如何用我的自定义函数替换javascript:navigateMailToLinkNew?

could you please let me know how to replace with my custom function here javascript:navigateMailToLinkNew ?

推荐答案

<span type="option" id="spanid" text="E-mail a Link" onmenuclick="javascript:navigateMailToLinkNew('http://sp2007site/Documents/090505-test.pdf')"

iconsrc =" / _ layouts / images / gmailnew.gif" iconalttext = QUOT;" id =" ID_SendToEmail">< / span>

iconsrc="/_layouts/images/gmailnew.gif" iconalttext="" id="ID_SendToEmail"></span>


('spanid')。attr(' onmenuclick ','javascript :yourCustomFunction')  &NBSP; &NBSP;  < ---它将取代函数
('spanid').attr('onmenuclick','javascript:yourCustomFunction')        <--- it will replace the function


这篇关于在jquery中替换函数名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆