Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/75.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用CSS内联样式以内联JavaScript编写html_Javascript_Html - Fatal编程技术网

如何使用CSS内联样式以内联JavaScript编写html

如何使用CSS内联样式以内联JavaScript编写html,javascript,html,Javascript,Html,我需要写一些html内联JavaScript,与CSS内联风格,如何做到这一点 类似这样的测试 <button class="pop-up display-screen" id="targetElement111" (click)="targetElement='targetElement111';model.title=''; model.content='/*need to write some htmlhere*/'; customTarget.open()"

我需要写一些html内联JavaScript,与CSS内联风格,如何做到这一点

类似这样的测试

<button class="pop-up display-screen" id="targetElement111"
    (click)="targetElement='targetElement111';model.title='';
    model.content='/*need to write some htmlhere*/';
    customTarget.open()">Open myModal
</button>
openmymodal

提前感谢

您可以在字符串中包含HTML,并转义引号

打开
myModal