【发布时间】:2013-04-30 14:07:55
【问题描述】:
当我点击p 标签时,有谁知道如何从我的 html 页面中删除“js/sample.js”文件:
<!DOCTYPE html>
<html>
<head>
<style>
p { color:red; margin:5px; cursor:pointer; }
</style>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="js/sample.js"></script>
</head>
<body>
<p>First Paragraph</p>
<p>Second Paragraph</p>
<p>Yet one more Paragraph</p>
<script>
$("p").click(function () {
$(' ').removeattr('src');
});
</script>
</body>
</html>
【问题讨论】:
-
你想在这里完成什么?您不能真正“卸载”已经评估过的脚本。 stackoverflow.com/questions/591685/…
标签: javascript jquery