我想在javascript中使用preg_match从html主体获取确切的脚本函数;
我尝试但不工作:
var whatineed=jQuery('html').html().match('$j('#send_form').submit(function(e) {(.*?)return true;');alert(whatineed);
请帮忙,我需要准确地说明这一部分:
$j.cookie('77fd78cdfc6b67274cf648bdf9f2d0b7', '60c6083d29b6a29d11068fecee75ab99', {path: '/'});
使用javascript:
来自此类型的实体<html><body><script language="JavaScript">
$j('#send_form').submit(function(e) {
$j.cookie('77fd78cdfc6b67274cf648bdf9f2d0b7', '60c6083d29b6a29d11068fecee75ab99', {path: '/'});
return true;
});
</script></body></html>
答案 0 :(得分:0)
这正是您正在运行的JavaScript吗?您的引号有问题......
var whatineed=jQuery('html').html().match('$j(\'#send_form\').submit(function(e) {(.*?)return true;');alert(whatineed);