【发布时间】:2026-01-10 22:35:02
【问题描述】:
我想知道这个链接会调用我想要的函数吗?
<a href="http://catalog.bitsltd.us/power_strips#replaced" onclick="document.getElementById('caShip').function caShip()" id="caShip">Some Text</a>
这是我要调用的函数...谁能告诉我为什么它也不起作用?
<script type="text/javascript">
$(function caShip(){
$('#caShip').replaceWith('Some HTML (the new HTML has an id of replaced)');
});
</script>
标签: jquery function hyperlink tags