我正在使用 Instantiation VisualAge Smalltalk Seaside 建立一个网站。我知道以下内容。
renderContentOn: html
html anchor
url: 'http://www.seaside.st';
with: 'Visit the Seaside'.
Run Code Online (Sandbox Code Playgroud)
但是,我想创建一个链接,其中图像是可点击的项目和下面的一些描述性文本。我目前正在做的是在 html 中构建它并让 Seaside 呈现代码。我想使用 Seaside 以与上述相同的方式构建项目,但找不到任何提示。我使用的代码是这样的:
html html: '<a
href="http://www.mywebsite.com:8080/Show some details?', imagePath, '"><img
style="border: 0px solid ;
text-align: right;height: 130px;" alt=""
src=" http://www.mywebsite.com:8080/images/', imagePath, '"></a>
<br> some text'
Run Code Online (Sandbox Code Playgroud)
有更好的(和更多的 Smalltalk)方式吗?
“显示一些细节”是我草率的打字。当然,它是一个有效的类名。
但是,我已经尝试过此操作,但遵循“html text: 'Some text'”。它应该只显示文本,它还显示当前页面类 - 所以,如果我的类是 DPAClassName 所以 url: ' http://www.mywebsite.com:8080/Show some details?, imagePath'; 变成
url: ' http://www.mywebsite.com:8080/DPAClassName ?, imagePath';
显示屏显示文本 'Some Text 但如下: 'Some Text'DPAClassName