-
-
[求助]如何編程實現快速查找HTML中的Javascript代碼?
-
发表于:
2010-4-2 18:00
5772
-
[求助]如何編程實現快速查找HTML中的Javascript代碼?
舉個例子,比如豆瓣主頁中:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>
豆瓣
</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="Sun, 6 Mar 2005 01:00:00 GMT" />
<meta content="提供图书、电影、音乐唱片的推荐、评论和价格比较,以及城市独特的文化生活。" name="description"/>
<script type="text/javascript" src="http://otho.douban.com/js/packed_jquery0.js"></script>
<script type="text/javascript" src="http://otho.douban.com/js/packed_jquery.suggest1.js"></script>
<link rel="shortcut icon" href="http://t.douban.com/favicon.ico" type="image/x-icon" />
<link href="http://otho.douban.com/css/packed_douban209.css" rel="stylesheet" type="text/css" />
<link href="http://otho.douban.com/css/separation/packed__all41.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://otho.douban.com/js/packed_douban58.js"></script>
<script type="text/javascript" src="http://otho.douban.com/js/separation/packed__all1.js"></script>
<script type="text/javascript" src="http://otho.douban.com/js/packed_jquery.history0.js"></script>
<style type="text/css">
</style>
<script type="text/javascript">
$(function(){
var max = 128,
isvalid = false,
node_root = '#db-talk',
node_textarea = '#db-talk textarea',
node_form = '#db-talk form',
node_rec = '#db-talk .msg a',
node_msg = '#db-talk .tipmsg',
node_dlg = '#dialog',
node_cta = '#db-talk .bn-cta',
css_rec_dlg = 'rec-dlg',
css_error = 'talk-error',
css_frm_error = 'errmsg',
css_bn_hover = 'bn-cta-over',
err_title = '请填写标题',
err_url = '请填写正确的网址',
}
我想提取function()函數,但是實際上如果寫循環函數的話{}的匹配就變得很棘手,比如a="123{"之類的問題出現就會出現匹配錯誤,不知道大家愛啊有沒什麽好方法?
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)