次のコードが見つかりました
これを行う方法を知りたい
http://stackoverflow.com をクリックすると、 リンクを開くhttps://stackoverflow.com/questions/ask?title=jquery
これは可能ですか?jquery初心者
<!DOCTYPE html>
<html>
<!--
Created using /
Source can be edited via /uwogi4/2/edit
-->
<head>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>Test Page</title>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]- ->
<style>
article, aside, figure, footer, header, hgroup,
menu, nav, section { display: block; }
body {
font-family: sans-serif;
}
p {
margin: 0px;
}
</style>
</head>
<body>
<div>Foo <span class='pc_more'>http://www.google.com</span></div>
<div>Bar <span class='pc_more'>http://webvikas.net.in</span></div>
<script>
jQuery(function($) {
$('div').click(function() {
window.location = $(this).find('.pc_more').html();
});
});
</script>
<script src="/js/render/edit.js"></script>
<script>var _gaq=[['_setAccount','UA-1656750-13'],['_trackPageview']];(function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)})(document,'script')</script></body>
</html>