1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| 它可以使我们使用jquery的方法进行操作,如获取指定节点内容
<script> var id = "00056"; var name = "大大大"; </script>
var script_text = $('script').html()
script_text = script_text.replace(/var/, '"{').replace(/;/, '}"').replace(/=/g, ':').replace(/"/g, '').replace(/\n/g, '').replace(/ /, '') script_text = script_text.replace(/}/, ',').replace(/var title :/, 'title :"').replace(/;/, '"}').replace(/\s*/g,""); script_text = eval("(" + script_text + ")"); var text_id = script_text.id var text_name = script_text.name
|