It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center




已关闭8年。




我需要在Yii中创建URL并在页面上指定一个div以在单击时聚焦...我知道我需要在URL中添加带有#的div名称,但是如何在Yii的createUrl函数中指定它...

据我所知,createUrl()函数仅提供参数选项,不提供元素选项。

最佳答案

如果检查createUrl:



您可以这样添加它:

 echo $this->createUrl('controller/action',array('#'=>'name'));

10-04 15:35