这是javascript
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.5.1.min.js" type="text/javascript"> </script>
<script type="text/javascript">
$(document).ready(function(){
$(".todoitem").click(function(){
alert('Item selected');
window.location = $(this).attr("href");
});
$(".todoitem".click();
});
</script>
<div>
<a href="http://www.google.com" class="todoitem">it is clicking here</a>
</div>
我想在这里放一个 javascript 而不是<a href="http://www.google.com" class="todoitem">it is clicking here</a>
喜欢
<div> <script type="text/javascript" class="todoitem"></script> </div>