如何在javascript中访问firefox中的javascript bookmarklet

时间:2013-11-09 11:23:24

标签: javascript mozilla bookmarklet

我为firefox制作了javascript bookmarklet。现在我想在javascript中访问它,就像其他文档/ DOM元素通过他们的id或类访问。请有人告诉我如何访问我的javascript bookmarklet。实际上我想通过访问它来使它闪烁/改变颜色。

我的书签代码

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"     
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js">
</script>
<title>Untitled Document</title>
<script>

</script>
</head>
<body>
<div id="toolbar" >
<a id='button' href='javascript:alert("my bookmarklet");' 
>Lysted</a>
 </div>
 </body>
 </html>

现在我想访问“script tags / javascript”中的bookmarklet。请帮助任何人

0 个答案:

没有答案