col*_*e71 7 javascript bootstrap-4
我是 HTML 新手。我能够显示 html 输入字段的自定义消息,如此处所述但是 ,我想在多行上显示消息,例如
Message title:
1. option 1 text
2. option 2 text
Run Code Online (Sandbox Code Playgroud)
我尝试在消息中插入br标签,但它不起作用。
我的代码如下所示:
<div class="col-6">
<input class="form-control" type="url" name="test_url" id="test_url" required="required" pattern="my_custom_url_pattern_goes_here" oninvalid="this.setCustomValidity('URL must be in one of the following format:\nFirst url example\nAnother url example')" oninput="setCustomValidity('')">
</div>
Run Code Online (Sandbox Code Playgroud)
我怎样才能实现这个目标?